5 test your pixel - OXYGEN-MARKET/oxygen-market.github.io GitHub Wiki
HOME » SNOWPLOW SETUP GUIDE » Step 1: setup a Collector » Setup the Cloudfront collector » 1. Setup a bucket on S3 for the pixel » 2. Upload the Tracking Pixel » 3. Create a bucket for the Cloudfront logs » 4. Create a Cloudfront distribution » 5. Test your pixel
Wait 10-15 minutes after creating the Cloudfront distribution before running the following test. (As it takes a little bit for the Cloudfront setup to complete...) Now try accessing your pixel over both HTTP
and HTTPS
using a browser, wget
or curl
:
http://{{SUBDOMAIN}}.cloudfront.net/i
https://{{SUBDOMAIN}}.cloudfront.net/i
If you have any problems, then double-check your CloudFront distribution's URL, and check the permissions on your pixel: it must be Openable by Everyone.
Now, wait 1-2 hours after creating the Cloudfront distribution before checking the S3 buckets where your logs are stored, to see that they are being generated correctly. (Note that it can take more than an hour for Cloudfront logs to start appearing.)
That's it - you now have a CloudFront distribution which can serve your tracking pixel fast to anybody anywhere in the world and log the request to Amazon S3 in your snowplow-logs
bucket.
At the moment, the Snowplow ETL process does not have a facility for filtering out events generated by your development or test environments.
For this reason, we strongly recommend that you also self-host a second tracking pixel, to serve as a kind of /dev/null
for Snowplow events in your development and test environments.
A couple of notes on this approach:
- You would need to configure your web application to use the correct CloudFront account ID depending on environment
- Unless you want to analyse your development or test environment, disable logging on the CloudFront distribution for your pixel
If you prefer, the Snowplow Analytics team maintains a publically available /dev/null
tracking pixel on this account ID:
d3rkrsqld9gmqf
You are now ready to setup a tracker.
Return to the setup guide.