How can I view reports by URL, traffic source, or a custom dimension?

    Content.ad allows publishers to segment reports based on their visitors’ utm_source and utm_campaign parameters with ease.  Alternatively, with a bit of custom code, you can specify your own custom values to track.  To get started, you will need to let us know values you would like grouped in your reporting dashboard.

    You can specify up to 20 values for each dimension that will be grouped in your reporting dashboard.  In the “My Account” section in your Content.ad account, click on “Traffic Sources”. Enter the desired values.  For example, if you want to see reporting by traffic with the utm_source value of “FB”, enter “FB” under “Source”.

    Source Campaign Tracking Setup
    To see reporting by your dimension values in the dashboard:

    1. Choose “Widget Report” from the “Report” drop-down at the top right.
    2. Click on “Traffic Sources” in the Show results by section.

    performance

    Optionally, you can email your account rep or support@content.ad to receive a daily click report that will include all values that you pass. This is useful if you need to record more than 20 values in either dimension.  Please note that this report does not include impression data, so you may need to join to your own analytics.

    Our guidelines prohibit passing user-identifying information through these parameters.  We recommend using general values; for example, pass the page title instead of the full URL or the device type (ex. “mobile”) instead of the full user agent.

    Customizing your dimensions

    If you want to track values other than your visitors’ utm_source or utm_campaign parameters, you can pass any desired value into the parameters “clientId” and/or “clientId2” in your widget installation code (more info).  In your reporting dashboard, clientId and clientId2 values will be reported as source and campaign, respectively.

    <div id="contentad[your widget ID here]"></div>
    <script type="text/javascript">
      (function(d) {
        var params =
        {
          id: "[your widget's unique ID here]",
          d:  "[your domain's unique ID here]",
          wid: "[your widget ID here]",
          clientId: "[your "source" value here]",
          clientId2: "[your "campaign" value here]",
          cb: (new Date()).getTime()
        };
    
        var qs=[];
        for(var key in params) qs.push(key+'='+encodeURIComponent(params[key]));
        var s = d.createElement('script');s.type='text/javascript';s.async=true;
        var p = 'https:' == document.location.protocol ? 'https' : 'http';
        s.src = p + "://api.content.ad/Scripts/widget2.aspx?" + qs.join('&');
        d.getElementById("contentad[your widget ID here]").appendChild(s);
      })(document);
    </script>

    Displaying different widgets to different traffic sources

    You may wish to show content with a different rating to visitors from different sources of traffic or track certain sources separately in reports. You can do this by setting up different widgets for each desired source and using a simple JavaScript conditional statement to switch between widgets with the desired settings.

    1. In addition to the default widget, create and configure an additional widget for each traffic source that requires separate settings or tracking.
    2. Ensure that visitors from the desired traffic sources are using URLs with a parameter unique to that source.
      http://example.com?utm_source=adsinc
    3. Add JavaScript to your page that swaps the widget ID and unique ID in the needed places based on the unique parameter.  In the example below, a specific widget is displayed for traffic from “adsinc”, while the default widget is used for all other traffic:
      <div id="contentad[Default widget WID value]"><!-- Load Widget Here --></div>
      <div id="contentad[Adsinc widget WID value]"><!-- Load Widget Here --></div>
      <script type="text/javascript">
          (function(d) {
              /* Add function for parsing URL parameters */
              function getURLParameter(name) {
                  return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
              }
      
              /* Get the value of utm_source from the URL */
              var trafficSource = getURLParameter('utm_source');
      
              /* If utm_source isn't set, try to get it from web storage */
              if (!(trafficSource)) {
                  if (sessionStorage.trafficSource) {
                      trafficSource = sessionStorage.trafficSource;
                  }
              }
      
              /* Save the source in web storage */
              sessionStorage.trafficSource = trafficSource;
      
              /* Define the default widget */
              var cad_id = "[Default widget unique ID value]";
              var cad_wid = "[Default widget WID value]";
              var cad_did = "[Your D value]";
      
              /* If utm_source is adsinc, swap widget */
              if (trafficSource == "adsinc") {
                  var cad_id = "[Adsinc widget unique ID value]";
                  var cad_wid = "[Adsinc widget WID value]";
              }
      
              /* Add the parameters to the widget installation code so that the correct widget is displayed*/
              var params =
              {
                  id: cad_id,
                  d: cad_did,
                  wid: cad_wid,
                  cb: (new Date()).getTime()
              };
      
              var qs=[];
              for(var key in params) qs.push(key+'='+encodeURIComponent(params[key]));
              var s = d.createElement('script');s.type='text/javascript';s.async=true;
              var p = 'https:' == document.location.protocol ? 'https' : 'http';
              s.src = p + "://api.content.ad/Scripts/widget2.aspx?" + qs.join('&');
              d.getElementById("contentad" + cad_wid).appendChild(s);
          })(document);
      </script>
      

    You may use an ad server to control the swapping logic instead.  You can write server-side code to perform this action as well, but this may not work as needed when page caching is enabled.