Managing Dot Tags

To create audiences from your website, as well as to track conversions, you will need to place Dot - Yahoo’s universal tracking tag - on the pages of your website. You can get a Dot tag using either the Gemini UI or the tag service. As a best practice, it is recommended that you place the tag on every page on your site.

Tags include the fields shown in the table below.

Fields

The tag object contains the following fields:

Name Description Type Add Update
id The unique identifier of the tag. long N/A Required
advertiserId The id of the advertiser that owns the tag. long Required N/A
codes The tag code. string Read-Only Read-Only
customEventScript Instrumentation code for passing custom events. Details are available in Installing Dot Tags. string Read-Only Read-Only
eventCnt24h Events count for the past 24 hours. long N/A Read-Only
eventCnt30d Events count for the past 30 days. If there is data for less than 30 days, then a forecast will be provided. long N/A Read-Only
name The tag name. string Required Optional
uuCnt24h Unique users count for the past 24 hours. long N/A Read-Only
uuCnt30d Unique users count for the past 30 days. If there is data for less than 30 days, then a forecast will be provided. long N/A Read-Only
defaultPixel This field is used for managing conversion rules. Setting it to “true” means that the conversion rules you create automatically apply to all the campaigns in your account and conversions are shown in reports for these campaigns. boolean Optional Optional

Endpoint

Resource URI

https://api.gemini.yahoo.com/v2/rest/tag/

Read tag data

The following parameters are supported when making GET calls to retrieve tag data:

Name Description Type
advertiserId The id of the parent advertiser. Use this parameter to get a filtered list of tags that belong to a certain advertiserId. long
mr The maximum number of rows to retrieve. Value should not be greater than 500. int
si The start index or the first element to retrieve. int
details Use this parameter to request tag details that include user counts and the tag code. boolean

Method: To retrieve data for a specific tag, make a GET call with the the ID parameter:

    http://api.gemini.yahoo.com/v2/rest/tag/401283

The response will be the tag associated with the id:

    {
        "errors": null,
        "timestamp": "2015-07-02 3:06:40",
        "response": {
            "id": 401283,
            "status": "ACTIVE",
            "advertiserId": 11610,
            "defaultPixel": true,
            "name": "remarketing tag"
        }
    }

Method: To retrieve the code and additional info for this tag, make a GET call with the the ID parameter and use the details parameter:

    https://api.gemini.yahoo.com/v2/rest/tag/403062?details=true

The response will be the tag associated with the id:

    {
        "errors": null,
            "timestamp": "2015-08-07 4:58:29",
            "response": {
                "status": "ACTIVE",
                "id": 403062,
                "defaultPixel": false,
                "advertiserId": 11610,
                "name": "remarketing dot tag",
            "codes": [
                {
                     "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'1000112697409','properties':{'pixelId':'403062'}});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\",\"http://d.yimg.com/wi/ytc.js\",\"dotq\");</script>",
                                                    "type": "js",
                                                    "protocol": "http"
                                                },
                                                {
                                                    "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'1000112697409','properties':{'pixelId':'403062'}});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>",
                                                    "type": "js",
                                                    "protocol": "https"
                                                },
                                                {
                                                    "instrumentationCode": "<img src=\"http://sp.analytics.yahoo.com/spp.pl?a=1000112697409&.yp=403062\"/>",
                                                    "type": "img",
                                                    "protocol": "http"
                                                },
                                                {
                                                    "instrumentationCode": "<img src=\"https://sp.analytics.yahoo.com/spp.pl?a=1000112697409&.yp=403062\"/>",
                                                    "type": "img",
                                                    "protocol": "https"
                                                }
                                            ],
                                            "customEventScript": "<script type=\"application/javascript\">\nwindow.dotq = window.dotq || [];\nwindow.dotq.push(\n{\n'projectId': '1000112697409',\n'properties': {\n'pixelId': '403062',\n'qstrings': {\n'et': 'custom',\n'ec': 'event category',\n'ea': 'event action',\n'el': 'event label',\n'ev': 'event value',\n'gv': 'conversion value'\n}\n} } ); </script>",
                                            "uuCnt30d": 0,
                                            "uuCnt24h": 0,
                                            "eventCnt30d": 0,
                                            "eventCnt24h": 0
                                        }
                                    }

Example: GET call for a filtered list of tags including details:

    https://api.gemini.yahoo.com/v2/rest/tag?advertiserId=11610&details=true

The response will be the relevant tags:

    {
        "errors": null,
        "timestamp": "2015-08-07 5:03:49",
        "response": [
            {
               "defaultPixel": true,
                       "status": "ACTIVE",
                       "id": 401283,
                       "advertiserId": 11610,
                       "name": "remarketing tag",
               "codes": [
                    {
                        "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10001969463985','properties':{'pixelId':'401283'}});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\",\"http://d.yimg.com/wi/ytc.js\",\"dotq\");</script>",
                                                                "type": "js",
                                                                "protocol": "http"
                                                            },
                                                            {
                                                                "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10001969463985','properties':{'pixelId':'401283'}});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>",
                                                                "type": "js",
                                                                "protocol": "https"
                                                            },
                                                            {
                                                                "instrumentationCode": "<img src=\"http://sp.analytics.yahoo.com/spp.pl?a=10001969463985&.yp=401283\"/>",
                                                                "type": "img",
                                                                "protocol": "http"
                                                            },
                                                            {
                                                                "instrumentationCode": "<img src=\"https://sp.analytics.yahoo.com/spp.pl?a=10001969463985&.yp=401283\"/>",
                                                                "type": "img",
                                                                "protocol": "https"
                                                            }
                                                        ],
                                                        "customEventScript": "<script type=\"application/javascript\">\nwindow.dotq = window.dotq || [];\nwindow.dotq.push(\n{\n'projectId': '10001969463985',\n'properties': {\n'pixelId': '401283',\n'qstrings': {\n'et': 'custom',\n'ec': 'event category',\n'ea': 'event action',\n'el': 'event label',\n'ev': 'event value',\n'gv': 'conversion value'\n}\n} } ); </script>",
                                                        "uuCnt30d": 0,
                                                        "uuCnt24h": 0,
                                                        "eventCnt30d": 0,
                                                        "eventCnt24h": 0
                                                    },
                                                    {
                                                        "defaultPixel": false,
                                                        "status": "ACTIVE",
                                                        "id": 403062,
                                                        "advertiserId": 11610,
                                                        "name": "remarketing dot tag",
                                                        "codes": [
                                                            {
                                                                "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'1000112697409','properties':{'pixelId':'403062'}});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\",\"http://d.yimg.com/wi/ytc.js\",\"dotq\");</script>",
                                                                "type": "js",
                                                                "protocol": "http"
                                                            },
                                                            {
                                                                "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'1000112697409','properties':{'pixelId':'403062'}});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>",
                                                                "type": "js",
                                                                "protocol": "https"
                                                            },
                                                            {
                                                                "instrumentationCode": "<img src=\"http://sp.analytics.yahoo.com/spp.pl?a=1000112697409&.yp=403062\"/>",
                                                                "type": "img",
                                                                "protocol": "http"
                                                            },
                                                            {
                                                                "instrumentationCode": "<img src=\"https://sp.analytics.yahoo.com/spp.pl?a=1000112697409&.yp=403062\"/>",
                                                                "type": "img",
                                                                "protocol": "https"
                                                            }
                                                        ],
                                                        "customEventScript": "<script type=\"application/javascript\">\nwindow.dotq = window.dotq || [];\nwindow.dotq.push(\n{\n'projectId': '1000112697409',\n'properties': {\n'pixelId': '403062',\n'qstrings': {\n'et': 'custom',\n'ec': 'event category',\n'ea': 'event action',\n'el': 'event label',\n'ev': 'event value',\n'gv': 'conversion value'\n}\n} } ); </script>",
                                                        "uuCnt30d": 0,
                                                        "uuCnt24h": 0,
                                                        "eventCnt30d": 0,
                                                        "eventCnt24h": 0
                                                    }
                                                ]
                                            }

Create a tag

Method: To create a new tag, make a POST call to the tag endpoint with the required fields.

POST https://api.gemini.yahoo.com/v2/rest/tag

Data passed
{
  "advertiserId": 11610,
  "name": "remarketing dot tag"
}



Example response
{
  "errors": null,
  "timestamp": "2015-07-23 0:31:36",
  "response": {
      "id": 403062,
      "status": "ACTIVE",
      "defaultPixel": false,
      "advertiserId": 11610,
      "name": "remarketing dot tag"
  }
}

Update an existing tag

Method: To update one or more existing tags, make a PUT call with one or more tag objects. Specify the fields to update; note that id is the only required parameter. The result will be the list of updated objects. Partial update is supported; fields that are either not passed or passed as null will be ignored for the update.

PUT https://api.gemini.yahoo.com/v2/rest/tag

Data passed
{
  "id": 401283,
      "name": "updated tag name"
}

Example response
{
  "errors": null,
  "timestamp": "2015-07-02 3:01:44",
  "response": {
      "status": "ACTIVE",
      "id": 401283,
      "advertiserId": 11610,
      "defaultPixel": false,
      "name": "updated tag name"
  }
}