Ads Campaign Tracking Implementation

Report 4 Downloads 53 Views
Ads Campaign Tracking Implementation In addition to the on­site Chartbeat code, you’ll need to add a tag to every creative delivered on  your site. This tag lets you pass information about that creative, including the campaign ID,  creative ID, etc. as they exist in your ad server. This tag should be added within your ad server  to any creative you want to track.     Note: This should be added ​ only​  to creative served on sites that include the rest of the  Chartbeat code.

Adding the Tracking Code to Creatives  

In order to track individual ads that load on your site, please include the following snippet of HTML/JavaScript as part of the creative that is loaded onto the page. When adding this code to the ad creative, please make sure that you are updating the Creative ID and Campaign ID associated with the creative served by your ad server. Also supply your Chartbeat account ID to the data-cb-account-id attribute. Make sure you are generating your own creative and campaign IDs. These attributes should contain values that you want us to track/display on the dashboard (so make them nice and friendly!). Alternatively, use macros from your ad server to auto-fill these values. <script src="​ //static.chartbeat.com/js/campaign_tracker.js​ ">

Optional:​ data-cb-line-id → Line items organize a campaign into a group of billable units and typically define run dates, targeting criteria, and creative references. Use this field to track individual line items in a campaign.

Verify Your Implementation

Once you’ve got everything set up for a campaign, use our debug overlay to verify your implementation. To activate the debug overlay, append the following query parameter to the test URL that you wish to check:

?__cb_debug=2 



Note that if the test URL already has multiple query parameters, you should use & ​__cb_debug=2

The debug overlay will place a blue border around all ads on the page that Chartbeat is tracking. If the creative tracking code is implemented correctly, the Campaign ID and Creative ID will be displayed for each ad.