Installing Dot Tags

To access and retrieve your tag, simply visit the Dot section within your Gemini or YAM+ account, or contact your account manager. Regardless of the Yahoo advertising application you use to retrieve your tag, your single Dot tag works for all your Yahoo search, native and display campaigns run through Gemini or YAM+.

For details on accessing your Dot tag code, see Create a Conversion Rule or the BrightRoll DSP help page.

Your Dot tag will look similar to this:

<script type="text/javascript">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({projectId:"XXXX",properties:{pixelId:"YYYY"}});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>

Use the entire Dot tag code without modification. As a best practice, it is recommended that you copy and paste it into your whatever page template or content management system you use to tag all your website pages. While you may place the tag anywhere on the webpage, it is recommended to paste it in the <head> section.

If you only wish to send events for certain pages, you’ll need to place the Dot tag only on those pages. This is often done with the help of a tag management platform, such as Ensighten or Google Tag Manager.

The steps for creating Conversion Rules in Gemini and BrightRoll DSP can be found at Create a Conversion Rule or the BrightRoll DSP help page.

Dot tag elements

The table below describes the important, required code elements of the Dot tag. You should not alter or change your Dot tag. Only the dotq parameter of the Dot tag code may be changed, and only if it conflicts with other JavaScript used on your site.

Code Description
pixelId A key value used to key rules to the transmitted data points. You should not modify the value provided with the tag code.
projectId Provides additional validation of tag ownership. You should not modify the value provided with the tag code.
https://s.yimg.com/wi/ytc.js This script, ytc.js, is loaded asynchronously so that rest of the page rendering is not blocked while fetching the tracking script. The asynchronous loading makes it possible to track all the events that can happen on a page even before the tracking script is fully loaded.
dotq A global array used for collecting event data. All the events that happen are queued in the global array and are processed by the tag script.

Standard custom event parameters

Dot supports the collection of custom defined events through the use of a custom event script. This is additional JavaScript code placed on a page that works in combination with the Dot tag on that same page to pass custom-defined values for a set of reserved custom event parameters.

The custom event script supports four custom event parameters that capture and describe a user’s interaction with the website. None of the parameters are mandatory, but at least one of the parameters must be included in the custom event call.

Parameter Type Description
ec Event category The object you want to track. For example, button.
ea Event action The type of interaction the user takes with the category object. For example, click.
el Event label Useful to label details about the event. For example, Product demo
ev Event value Use it to track a numerical value associated with the goal. For example, a numeral 5.

Capture a custom event on the page

When capturing an event to track, follow the template below:

<script type="application/javascript">
window.dotq = window.dotq || [];
window.dotq.push(
{
  'projectId': '10001234567890',
  'properties': {
    'pixelId': '654321',
    'qstrings': {
      'et': 'custom',
      'ec': 'event category',
      'ea': 'event action',
      'el': 'event label',
      'ev': 'event value',
      'gv': 'conversion value'
    }
} } ); </script>

Note that et=custom cannot be changed. Note also that for the ev value, the enum value has to be passed as a string for the JavaScript value comparison.

The following example shows how you might use the custom event script to capture the event of a user adding a $249 electronics item to a shopping cart:

<script type="application/javascript">
window.dotq = window.dotq || [];
window.dotq.push(
{
  'projectId': '10001234567890',
  'properties': {
    'pixelId': '654321',
    'qstrings': {
      'et': 'custom',
      'ec': 'shopping',
      'ea': 'add to cart',
      'el': 'add to cart',
      'ev': 'electronics',
      'gv': '249.00'
    }
} } ); </script>

Note the following:

  • The et parameter is required to be included and set to the value “custom”.
  • The values of projectID and pixelID must match those of the same parameters of the Dot tag included on the page.

To capture custom events on a user-initiated action:

A common use for the custom event script is to capture an event from an action a user takes after the page loads, like when submitting a form or starting a video.

Using the template above, you can capture events specific to an element of a webpage by including the push call inline.

<button onclick=" window.dotq = window.dotq || []; window.dotq.push( { 'projectId': '10001234567890', 'properties': {  'pixelId': '654321', 'qstrings': { 'et': 'custom', 'ec': 'event category', 'ea': 'event action', 'el': 'event label', 'ev': 'event value', 'gv': 'conversion value' } } } ); ">Submit</button>

Capture dynamic event values

When you use script to dynamically assign values to events, an additional conversion value parameter – gv – is used. In Yahoo advertising applications you may choose to assign a constant conversion value to any conversion rule defined.

Alternatively, you can dynamically assign a conversion value to each standard and custom event collected through your Dot tag by populating the gv parameter with JavaScript. This conversion value is a numeric monetary value that represents the revenue associated with the event, and is used to calculate the “revenue” of conversions in reports.

Parameter Type Description
gv Conversion value Used to pass a dynamic conversion value on a standard or custom event. This represents the goal’s revenue shown in reports.

Assign a conversion value to a custom event

In the example snippets below, the function Revenue is used to show possible business logic. The following are just examples. The actual logic and code for calculating a conversion value would be customized by the advertiser/developer.

<script> function Revenue (totalrev, revshare) {return totalrev * revshare;} // Function for computing the conversion value </script>
<script> window.dotq = window.dotq || [];window.dotq.push({ 'gv': Revenue(20, .5); }); // Compute and pass the conversion value  </script>

For reseller and multiple website owners

If you’re a reseller or advertiser with multiple websites and you want to target users by website, you need to create a separate account per website. You also need to insert an additional parameter in the custom event field.

Below is an example of the dotq template.

<script type="application/javascript">
window.dotq = window.dotq || [];
window.dotq.push(
{
  'projectId': '10000', //this value can be found on your Dot page in your account
  'properties': {
    'pixelId': '654321', //this value can be found on your Dot page in your account
    'qstrings': {
      'et': 'custom',
        'advertiser_id': 'insert the Gemini account id here',
'ea': 'insert the standard value',  //this represents the user interaction with your product
      'product_id': 'product_id value',
    }
} } ); </script>