Hi there,
I know its deprecated however we are using the cloudfront collector with javascript tracker 2.12.0 and hoping someone can help with this question.
I want to make sure our tracking is considered first party server side, so cookies do not expire after 7 days.
To do this, we setup a CNAME record for the collector URL, so that the collector URL has the same domain as the websites that we are tracking.
e.g. If our website is mydomaingoeshere.com.au, then we setup a CNAME record of c.mydomaingoeshere.com.au
The snowplow tag is then updated so the CNAME is the collector URL
<!-- Snowplow starts plowing -->
<script type="text/javascript">
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1vq1pwo3xhu9o.cloudfront.net/2.12.0/sp.js","snowplow"));
window.snowplow('newTracker', 'cf', 'c.mydomaingoeshere.com.au', { // Initialise a tracker
appId: '{{Snowplow App ID}}',
eventMethod:'get',
contexts: {
optimizelyXSummary: true,
webPage: true
}
});
Events are successfully being collected and making it through to Snowflake DW
The thing that is confusing me, is when I look in browser developer console > network, I can see records such as this that are showing the domain is the expected CNAME domain
But for the network name of “sp.js”, it appears as the cloudfront URL that points to the S3 hosted sp.js file.
This makes sense because in the Snowplow Tag that is where we are saying the sp.js file exists.
But does this mean that it still is not considered first party server side? Do we also need to setup CNAME records for the cloudfront url that points to sp.js file? I’m concerned I’ve missed something in the required setup
I’ve trawled the documentation and forums and can’t find anything that helps me clearly understand this, so have obviously missed something. Would appreciate you helping me to understand.
Thanks,
Ryan