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.

    Can I Receive Reports Via eMail?

    Reports will be emailed in Excel format each day including information from the previous day.

    Publisher Reports

    The widget performance report includes date, widget name, domain, impressions, clicks, ctr, internal clicks, sponsored clicks, eCPM, eCPC, eCPA and revenue.

    The publisher clicks report includes date, domain id, domain name, widget id, widget name, device type, country, clientid, clientid2, revenue and clicks.

     

    Advertiser Reports

    The campaign performance report includes date, campaign id, campaign name, ad headline, ad url, ad image, ad id, publisher domain id, ad clicks, conversions, cpc and spend.

    The advertiser clicks report includes date, campaign name, ad id, ad headline, device type, country, content type, publisher domain id, spend, ad clicks, excluded clicks, conversions, eCPC and eCPA.

    Deposit receipts provide verification of receipt of each deposit.