-
Notifications
You must be signed in to change notification settings - Fork 0
Set your tracker to point at the Clojure collector endpoint
HOME > SNOWPLOW SETUP GUIDE > Step 1: setup a Collector > Clojure collector setup > Set your tracker to point at the Clojure collector endpoint
Now that you've set up your Clojure collector, you need to configure your tracker to send event data to it.
Assuming you're using the Javascript tracker, you'll need to modify your Javascript tracking tags to set the correct end point. The standard tracking tags look as follows:
<!-- Snowplow starts plowing -->
<script type="text/javascript">
var _snaq = _snaq || [];
_snaq.push(['setCollectorCf', '{{CLOUDFRONT DOMAIN}}']);
_snaq.push(['enableLinkTracking']);
_snaq.push(['trackPageView']);
(function() {
var sp = document.createElement('script'); sp.type = 'text/javascript'; sp.async = true; sp.defer = true;
sp.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/0.9.1/sp.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sp, s);
})();
</script>
<!-- Snowplow stops plowing -->
The line...
_snaq.push(['setCollectorCf', '{{CLOUDFRONT DOMAIN}}']);
...is the one that sets the end point, and assumes that you're using the Cloudfront collector rather than the Clojure collector.
To set your Clojure collector as the end point, remove that line and replace it with:
_snaq.push(['setCollectorUrl', '{{COLLECTOR URL}}']);
Note that the URL your enter must exclude http://
or https://
. In our case, the url would be: collector.snplow.com
.
Also, you need to tell the JavaScript that it doesn't need to send user IDs to the collector - this is because your Clojure collector is now setting user IDs. You do this like so:
_snaq.push(['attachUserId', false]);
So, the complete tag will look like this:
<!-- Snowplow starts plowing -->
<script type="text/javascript">
var _snaq = _snaq || [];
_snaq.push(['setCollectorUrl', 'collector.snplow.com']);
_snaq.push(['attachUserId', false]);
_snaq.push(['enableLinkTracking']);
_snaq.push(['trackPageView']);
(function() {
var sp = document.createElement('script'); sp.type = 'text/javascript'; sp.async = true; sp.defer = true;
sp.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/0.9.1/sp.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sp, s);
})();
</script>
<!-- Snowplow stops plowing -->
Home | About | Project | Setup Guide | Technical Docs | Copyright © 2012-2013 Snowplow Analytics Ltd
HOME > SNOWPLOW SETUP GUIDE > Collectors > Clojure collector setup
- [Setup a Collector] (setting-up-a-collector)
- [Setup the Clojure Collector] (Setting-up-the-Cloudfront-collector)
- Download the Clojure collector WAR file
- Create a new application in Elastic Beanstalk, and upload the WAR file into it
- [Enable logging to S3](Enable logging to S3)
- Enable support for HTTPS
- [Additional configuration options (optional)](additional configuration options)
- [Step 2: Setup a Tracker] (setting-up-a-tracker)
- [Step 3: Setup EmrEtlRunner] (setting-up-EmrEtlRunner)
- [Step 4: Setup the StorageLoader] (setting-up-storageloader)
- [Step 5: Analyze your data!] (Getting started analyzing Snowplow data)
Useful resources