{"id":1138,"date":"2026-04-01T21:15:14","date_gmt":"2026-04-01T21:15:14","guid":{"rendered":"https:\/\/protolinker.com\/?post_type=docs&#038;p=1138"},"modified":"2026-04-01T21:45:55","modified_gmt":"2026-04-01T21:45:55","password":"","slug":"what-is-the-difference-of-tag-and-links-scripts","status":"publish","type":"docs","link":"https:\/\/protolinker.com\/pt\/documentation\/what-is-the-difference-of-tag-and-links-scripts\/","title":{"rendered":"Qual \u00e9 a diferen\u00e7a entre scripts de Tags e de Links?"},"content":{"rendered":"<p class=\"wp-block-paragraph\" style=\"\">Um <strong>Tag Script<\/strong> \u00e9 anexado diretamente a uma tag. Ele altera o valor dessa tag antes que o valor seja enviado para qualquer outro lugar. Isso significa que, se a tag estiver conectada a v\u00e1rios destinos, todos eles receber\u00e3o o valor depois que o mesmo script tiver sido aplicado, e o valor tamb\u00e9m ser\u00e1 atualizado no pr\u00f3prio protocolo.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Um <strong>Link Script<\/strong> \u00e9 anexado a um link espec\u00edfico entre duas tags. Ele altera o valor apenas para essa conex\u00e3o. Isso significa que outros links da mesma tag continuar\u00e3o usando o valor original e n\u00e3o ser\u00e3o afetados por esse script.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\"><strong>Quando usar cada um?<\/strong><\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Use a <strong>Tag Script<\/strong> quando o valor sempre precisar ser processado da mesma forma, independentemente de para onde ele for enviado.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Use a <strong>Link Script<\/strong> quando apenas um destino precisar de um tratamento diferente.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\"><strong>Exemplo simples:<\/strong><\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Pense em uma tag como uma panela de comida e nos links como os pratos servidos a partir dela.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Um <strong>Tag Script<\/strong> \u00e9 como temperar a panela inteira. Todos os pratos servidos a partir dela ter\u00e3o o mesmo sabor.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Um <strong>Link Script<\/strong> \u00e9 como adicionar molho em apenas um prato. Essa mudan\u00e7a afeta somente aquele prato, enquanto os outros permanecem iguais.<\/p>","protected":false},"excerpt":{"rendered":"<p>A Tag Script is attached directly to a tag. It changes the value of that tag before the value is sent anywhere else. This means that if the tag is connected to multiple destinations, all of them will receive the value after the same script has been applied and the value will also be updated &hellip;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[16,15],"doc_tag":[],"class_list":["post-1138","docs","type-docs","status-publish","hentry","doc_category-links","doc_category-tags"],"year_month":"2026-07","word_count":202,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"beraldoigor","author_nicename":"beraldoigor","author_url":"https:\/\/protolinker.com\/pt\/author\/beraldoigor\/"},"doc_category_info":[{"term_name":"Links","term_url":"https:\/\/protolinker.com\/pt\/docs-category\/links\/"},{"term_name":"Tags","term_url":"https:\/\/protolinker.com\/pt\/docs-category\/tags\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/docs\/1138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/comments?post=1138"}],"version-history":[{"count":0,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/docs\/1138\/revisions"}],"wp:attachment":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/media?parent=1138"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/doc_category?post=1138"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/doc_tag?post=1138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}