Google’s Accelerated Mobile Pages (AMP) project is a way to increase page loading speed on mobile devices. TUNE networks and partners taking advantage of AMP need to do just a little work to make tracking links and creatives function in their AMP environments.
Important: When using AMP, you must use HTTPS in your URLs. If you have a custom domain and do not have an SSL certificate, use https://NETWORKID.go2cloud.org instead, and replace “NETWORKID” with your TUNE network ID.
To learn more about AMP, check out our marketing blog post and the AMP Project site.
Pixel-Based Conversion Tracking
When using either the iFrame or image pixel conversion protocol, you’re placing a pixel on a conversion page. Once you have the AMP version of your site ready, you can implement your TUNE tracking pixels using the following steps.
Image Pixel
With an image pixel, your original HTML code looks something like this:
<img src="http://networkid.go2cloud.org/aff_l?offer_id=32&adv_sub=SUB_ID" width="1" height="1" />
AMP requires you to use the <amp-pixel> tag. Using that tag, our example changes to:
<amp-pixel src="https://networkid.go2cloud.org/aff_l?offer_id=32&adv_sub=SUB_ID"></amp-pixel>
Make sure you use https:// instead of http:// in the pixel URL.
Overcoming Caching Issues
The RANDOM substitution can be used to avoid image caching issues. If the pixel is cached, your conversions may not be reported accurately. In your <amp-pixel> URL, append &nocache=RANDOM to prevent caching the pixel. For example:
<amp-pixel src="https://networkid.go2cloud.org/aff_l?offer_id=32&adv_sub=SUB_ID&nocache=RANDOM"></amp-pixel>
Note: The random value is not stored or otherwise used by our servers.
iFrame Pixel
Per the AMP specification, to use an iFrame you must include in the <head>:
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
Then with the iFrame pixel, your original HTML code looks something like this:
<iframe src="http://networkid.go2cloud.org/aff_l?offer_id=32&adv_sub=SUB_ID" scrolling="no" frameborder="0" width="1" height="1"></iframe>
AMP requires you to use the <amp-iframe> tag. Using that tag, our example changes to:
<amp-iframe width=1 height=1 sandbox="allow-scripts allow-same-origin" frameborder="0" src="https://networkid.go2cloud.org/aff_l?offer_id=32 &adv_sub=SUB_ID"> </amp-iframe>
Make sure you use https:// instead of http:// in the iFrame URL.
Serving Ad Groups
When getting the iFrame code for an ad group, the code looks something like this:
<iframe src="http://networkid.go2cloud.org/aff_ad?campaign_id=21&aff_id=1002&format=iframe" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="220" height="240"></iframe>
AMP requires you to use the <amp-iframe> tag. Using that tag, our example changes to:
<amp-iframe width=220 height=240 sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" frameborder="0" src="https://networkid.go2cloud.org/aff_ad?campaign_id=21&aff_id=1002&format=iframe"> <amp-img layout="fill" src="https://www.imagemagick.org/Usage/canvas/trans_fx.png" placeholder></amp-img> </amp-iframe>
Per the AMP specification, you must also include the following in <head>:
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
Using Impression Pixels
When you retrieve your impression pixel, the original HTML code looks something like this:
<img src="http://networkid.go2cloud.org/aff_i?offer_id=22&aff_id=16" width="1" height="1" />
As with pixel tracking above, AMP requires you to use the <amp-pixel> tag. Using that tag, our example changes to:
<amp-pixel src="https://networkid.go2cloud.org/aff_i?offer_id=22&aff_id=16"></amp-pixel>
Make sure you use https:// instead of http:// in the pixel URL. Also, use the nocache=RANDOM technique to circumvent caching issues, like so:
<amp-pixel src="https://networkid.go2cloud.org/aff_i?offer_id=22&aff_id=16&nocache=RANDOM"></amp-pixel>