Use Google Tag Manager to Set up DPA Dot Tags¶
This guide describes how you can use Google Tag Manager (GTM) to set up and deploy your Yahoo Dot tag. Using GTM, you can create a custom script for your product ads across your webpages.
That said, GTM does not provide support for a Yahoo Dot tag template, which means that you’ll need to perform a custom tag setup, following the steps outlined below.
If you already have an account with GTM and are familiar the GTM UI, you’ll want to take advantage of this tag manager to set up your Dot tags for DPA.
Setup Steps for Google Tag Manager¶
Follow these steps:
Sign in to GTM and create a new tag by clicking New Tag.

Provide a name for the tag (for example, Native & Search Dot Tag) and click Choose a tag type to begin setup.

Search for custom and select Custom HTML.

Paste the Native & Search Dot tag generated by Gemini.
A sample Dot tag is included below.

Note that the projectId (in this case, 10000) and pixelId (10015984) are provided by Native & Search.
<script type="text/javascript">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({projectId:"10000",properties:{pixelId:"10015984"}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!="complete"&&rs!="loaded"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,"script","https://s.yimg.com/wi/ytc.js","dotq"); </script>
Scroll down and click Choose a trigger to make this tag fire and choose All Pages.

Click Save to save the tag.
Follow steps 2-4 to create another custom HTML tag, but copy-and-paste the DPA custom script.
The double curly braces indicate that ea
and product_id
are dynamic values that we’ll define later in the Variable section of the Google Tag Manager, like this:

A sample tag name could be DPA Custom Script.
These are the values that will be passed in from the your website.

Save the tag without setting up a trigger.
Return to the Native & Search Dot Tag that was set up previously. Follow these mini-steps:
Click the edit icon on the top and click Advanced Settings. Now click Tag Sequencing and click Fire a tag after Native & Search Dot Tag fires and select the DPA Custom Script. Check the Don’t fire DPA Custom Script if Native & Search Dot Tag fails or is paused checkbox.
Finally, click Save to save the tag.

Click Variable.
This sets up the ea
and product_id
variables.

Click New under User-Defined Variables.

Enter
ea
as the name of the variable and click Choose a variable type to begin setup.

There are many ways to define the variable. In this guide, we select Custom Javascript in order to fetch the value with a class.

In our example website, the
ea
(for example, AddToCart) is placed between a HTML tag with the class nameea
(for example,<span class=’ea’>AddToCart</span>
).
The JavaScript code to fetch AddToCart in our example is
document.getElementsByClassName("ea")[0].innerHTML.
For our example snippet, we need to add a function like this:
function(){
var a=document.getElementsByClassName("ea")[0].innerHTML;
return a;
}

Save the variable
ea
and repeat steps 11-14 forproduct_id
.To obtain the GTM Tag for your site, go to ADMIN and then click Install Google Tag Manager.
Follow the instructions to apply the tag on to the your site.
When the tag setup is completed, you can test it by pressing Preview or Submit under the WORKSPACE section to launch the tag.

Under the debug mode (Preview mode), the values
ea
andproduct_id
should be populated under Variables.
The Dot tag and the DPA custom script can also be confirmed by installing and using the Yahoo Dot Helper Chrome Extension.
