Home >
Paid Traffic Sources >
Mobile
CDN settings with trackers (12)
05-11-2015 05:25 AM
#1
ryanfuse (Member)
CDN settings with trackers
Hi guys, I have a few questions I need to clear up to make sure tracking is working correctly.
I'm using a normal VPS server + Cloudfront + Thrive
I'm wondering if i need to "Forward Query Strings" and "Forward Cookies" if i want conversion tracking to work correctly?
Thanks in advance
05-11-2015 05:36 AM
#2
virginmobile (Member)
the basic rules that cdn handle static files only
05-11-2015 05:37 AM
#3
ryanfuse (Member)
I know the basic rules , what I'm asking is not basic
05-11-2015 05:39 AM
#4
ryanfuse (Member)
By forwarding query string cloud front CDN would not work correctly because it will treat each page as a new page . But it sounds like if I don't pass query string conversion tracking would be affected as trackers rely on query strings . Same thing with cookie .
05-11-2015 06:06 AM
#5
ocean25 (Member)

Originally Posted by
ryanfuse
Hi guys, I have a few questions I need to clear up to make sure tracking is working correctly.
I'm using a normal VPS server + Cloudfront +
Thrive
I'm wondering if i need to "Forward Query Strings" and "Forward Cookies" if i want conversion tracking to work correctly?
Thanks in advance
Cloudflare, I believe, cannot handle querry strings, it will re-cache a page everytime when a querry string changes, thus making it useless. I've tried using it before, but went with Rackspace cloud files instead.
05-11-2015 06:13 AM
#6
ryanfuse (Member)
U mean cloudfront or cloudflare ocean25
05-11-2015 06:47 AM
#7
ocean25 (Member)

Originally Posted by
ryanfuse
U mean cloudfront or cloudflare ocean25
Oops, yeah, I got them mixed up.
05-11-2015 08:28 AM
#8
noipfraud (Member)

Originally Posted by
ryanfuse
I'm wondering if i need to "Forward Query Strings" and "Forward Cookies" if i want conversion tracking to work correctly?
Don't use CDN on your tracking domains unless you are always forwarding tracker (PHP i think for
Thrive) request to your origin server.
The reason is that the CDN will cache the script output from your tracker. Therefore 1) stats will not record properly, and 2) split testing will not work properly.
So even when you are passing Query String & Cookies - the CDN will still try and use a previous cached result first, before passing the request to your server.
So my recommendations:
- Put your landers and tracker on separate (sub) domains so you can set the tracker domain to bypass the CDN (pause in CloudFlare)
- If your pages contain lots of assets (images, css, js) - then put those on a CDN for sure
- If your landing pages are PHP based that includes php code for the tracker or tools like noipfraud, make sure this is not on a CDN
- Make sure you test your webserver that your tracker is on to ensure it doesnt have internal caching enabled
05-11-2015 08:52 AM
#9
zeno (Administrator)
^^ what he said.
It is not worth the hassle of putting a CDN with origin pull over the top of a tracking system.
Firstly, this makes little sense since the tracker is completely dynamic, so every single request will have to never be cached. If the tracker redirects to another tracker domain address then you get multiple pulls in a row and you may lose the advantage you get in the 'naked' system where persistent connections save time.
Secondly, this creates a scenario where your tracker sees a CDN server - not a user - as the person requesting URLs. To get around this you then need to forward IP headers, reconfigure your system a little, so that your webserver (Apache, Nginx) is passed the users real IP - not that of a CDN node.
Thirdly, if there are any detection technologies that are not based on IP, e.g. through interaction with the users device, browser, etc., then these could potentially get confused as well.
The ONLY advantage I can see here is from leveraging the better connectivity/routing that a CDN may have, but CDN's aren't made for reducing the latency on origin-pull from a completely dynamic system. They are optimised for caching.
So yeah, TL;DR, don't put your tracker behind a CDN but put your landing page domain behind one if you so fancy. And always be sure to exclude .php from caching.
To answer OPs question directly: I tested turning forwarding query strings on/off on CloudFront when I was using it for landing page tests with Voluum (where I passed strings on to the lander), it made no difference. Not sure about the cookies but I would turn both on if in doubt.
05-11-2015 12:07 PM
#10
ryanfuse (Member)
ok, thanks for the reply guys.
Make sure you test your webserver that your tracker is on to ensure it doesnt have internal caching enabled
Internal caching like varnish, memcache? I trust a typical LEMP installation will not have any internal caching enabled right?
Conclusion:
1) don't put tracker domain on CDN.
2) no idea if you need to forward query string or cookies, probably not.
05-11-2015 01:19 PM
#11
noipfraud (Member)

Originally Posted by
ryanfuse
Internal caching like varnish, memcache? I trust a typical LEMP installation will not have any internal caching enabled right?
Varnish -> No
Memcache -> Should be fine
The one I have come across most is PHP-FPM caching of PHP script output for say 10 seconds. Great when your running something like wordpress - but a killer if your running tracking.
To test if you have caching on your server -
just do the following. Create a test.php script with the following content:
Code:
<?php
echo mt_rand();
Then reload that page in your browser quickly (not so quick you cant see the result). Each load should give you a different number. If the number is the same for a number of loads -> your server response is being cached somewhere.

Originally Posted by
ryanfuse
no idea if you need to forward query string or cookies, probably not.
For CDN's the less you forward the better - so for basic assets like images, css and JS you dont need query variables or cookies. So dont enable them unless you need them.
Basically - the more unique the request - the less you benefit from the CDN
05-11-2015 01:20 PM
#12
ryanfuse (Member)
Noipfraud thanks a lot for the script
Home >
Paid Traffic Sources >
Mobile