Javascript Tracker
HOME » SNOWPLOW TECHNICAL DOCUMENTATION » Trackers » JavaScript Tracker
Contents
- 1 Overview
- 2 General parameters
- 2.1 Loading Snowplow.js
- 2.2 Initialising a tracker
- 2.2.1 Setting the application ID
- 2.2.2 Setting the platform
- 2.2.3 Configuring the cookie domain
- 2.2.4 Configuring the cookie name
- 2.2.5 Configuring base 64 encoding
- 2.2.6 Respecting Do Not Track
- 2.2.7 User fingerprinting
- 2.2.8 Setting the user fingerprint seed
- 2.2.9 Setting the page unload pause
- 2.2.10 Altering cookies
- 2.3 Other parameters
- 2.4 Managing multiple trackers
- 2.5 How the Tracker uses cookies
- 3 Specific Event Tracking
- 3.1 Pageviews
- 3.1.1
trackPageView
- 3.1.1
- 3.2 Pagepings
- 3.2.1
enableActivityTracking
- 3.2.1
- 3.3 Ecommerce transaction tracking
- 3.3.1
addTrans - 3.3.2
addItem - 3.3.3
trackTrans - 3.3.4 Pulling it all together: an example
- 3.3.1
- 3.4 Social tracking
- 3.4.1
trackSocialInteraction
- 3.4.1
- 3.5 Campaign tracking
- 3.6 Ad tracking methods
- 3.7 Tracking custom structured events
- 3.7.1
trackStructEvent
- 3.7.1
- 3.8 Tracking custom self-describing (unstructured) events
- 3.8.1
trackSelfDescribingEvent
- 3.8.1
- 3.9 Link click tracking
- 3.9.1
enableLinkClickTracking - 3.9.2
refreshLinkClickTracking - 3.9.3
trackLinkClick
- 3.9.1
- 3.10 Form tracking
- 3.10.1
enableFormTracking
- 3.10.1
- 3.11
trackAddToCartandtrackRemoveFromCart - 3.12
trackSiteSearch - 3.13
trackTiming - 3.14 Enhanced Ecommerce tracking
- 3.15 Consent event tracking methods
- 3.15.1
trackConsentGranted - 3.15.2
trackConsentWithdrawn - 3.15.3
Consent documents
- 3.15.1
- 3.16 Custom contexts
- 3.17 Error tracking
- 3.17.1
trackError - 3.17.2
enableErrorTracking
- 3.17.1
- 3.18 Setting the true timestamp
- 3.1 Pageviews
- 4 Advanced usage of the JavaScript Tracker
- 5 Modifying Snowplow JS
- 6 For developers
- 7 Cookies and Local Storage information
1. Overview
The Snowplow JavaScript Tracker works in much the same way as JavaScript trackers for other major web analytics solutions including Google Analytics and Omniture. We have tried, as far as possible, to keep the API very close to that used by Google Analytics, so that users who have implemented Google Analytics JavaScript tags have no difficulty also implementing the Snowplow JavaScript tags.
Tracking is done by inserting JavaScript tags onto pages. These tags run functions defined in tracker.js, that trigger GET requests of the Snowplow pixel. The JavaScript functions append data points to be passed into Snowplow onto the query string for the GET requests. These then get logged by the Snowplow collector. For a full list of data points that can be passed into Snowplow in this way, please refer to the Snowplow tracker protocol documentation.
The JavaScript Tracker supports both synchronous and asynchronous tags. We recommend the asynchronous tags in nearly all instances, as these do not slow down page load times.
Home | About | Project | Setup Guide | Technical Docs | Copyright © 2012-2020 Snowplow Analytics Ltd. Documentation terms of use.
Pages 406
- Home
- .NET Analytics SDK
- .NET Analytics SDK Event Transformer
- .NET Analytics SDK setup
- .NET Tracker
- .NET Tracker 0.1.2
- .NET Tracker 1.0.0
- .NET Tracker Quickstart Guide
- .NET tracker setup
- .NET tracker setup 1.0.0
- 1 General parameters for the Javascript tracker
- 1 General parameters for the Javascript tracker v1
- 1 General parameters for the Javascript tracker v2.0
- 1 General parameters for the Javascript tracker v2.10.0
- 1 General parameters for the Javascript tracker v2.11
- 1 General parameters for the Javascript tracker v2.12
- 1 General parameters for the Javascript tracker v2.13
- 1 General parameters for the Javascript tracker v2.2
- 1 General parameters for the Javascript tracker v2.3
- 1 General parameters for the Javascript tracker v2.4
- 1 General parameters for the Javascript tracker v2.5
- 1 General parameters for the Javascript tracker v2.6
- 1 General parameters for the Javascript tracker v2.7
- 1 General parameters for the Javascript tracker v2.8
- 1 General parameters for the Javascript tracker v2.9
- 1 Installing EmrEtlRunner
- 1 Setup a bucket on S3 for the pixel
- 2 Specific event tracking with the Javascript tracker
- 2 Specific event tracking with the Javascript tracker v1
- 2 Specific event tracking with the Javascript tracker v2.0
- 2 Specific event tracking with the Javascript tracker v2.10.0
- 2 Specific event tracking with the Javascript tracker v2.11
- 2 Specific event tracking with the Javascript tracker v2.12
- 2 Specific event tracking with the Javascript tracker v2.13
- 2 Specific event tracking with the Javascript tracker v2.2
- 2 Specific event tracking with the Javascript tracker v2.3
- 2 Specific event tracking with the Javascript tracker v2.4
- 2 Specific event tracking with the Javascript tracker v2.5
- 2 Specific event tracking with the Javascript tracker v2.6
- 2 Specific event tracking with the Javascript tracker v2.7
- 2 Specific event tracking with the Javascript tracker v2.8
- 2 Specific event tracking with the Javascript tracker v2.9
- 2 Upload the Tracking Pixel
- 2 Using EmrEtlRunner
- 3 Advanced usage of the JavaScript Tracker
- 3 Create a bucket for Cloudfront logs
- 3 Scheduling EmrEtlRunner
- 4 Create a Cloudfront distribution
- 4 For developers
- 4 Loading shredded types
- 4 Self hosting Spark Enrich
- 5 Configuring enrichments
- 5 Test your pixel
- 6 Configuring shredding
- 7 Setting up end to end encryption
- ActionScript3 Tracker
- ActionScript3 Tracker Setup
- Additional configuration options
- Amazon Redshift storage
- Analytics documentation
- Android and Java Tracker
- Android app walkthrough
- Android app walkthrough 0.1.0
- Android app walkthrough 0.2.0
- Android Integration
- Android Integration 0.4.0
- Android Integration 0.5.0
- Android Integration 0.6.0
- Android Testing locally and Debugging
- Android Testing locally and Debugging 0.4.0
- Android Testing locally and Debugging 0.5.0
- Android Tracker
- Android Tracker 0.3.0
- Android Tracker 0.4.0
- Android Tracker 0.5.0
- Android Tracker 0.6.0
- Android Tracker 0.7.0
- Android Tracker Setup
- Android Tracker Setup 0.2.0
- Android Tracker Setup 0.3.0
- Android Tracker Setup 0.4.0
- Android Tracker Setup 0.5.0
- Android v0.1 and Java Tracker v0.5
- API Request enrichment
- Arduino Tracker
- Arduino tracker setup
- Artifact repositories
- AWS Lambda source
- AWS Lambda source setup
- AWS sub account setup
- Batch pipeline steps
- Batch pipeline steps r102
- Batch pipeline steps r86
- Batch pipeline steps r87
- Batch pipeline steps r89
- Batch pipeline steps r90
- Batch pipeline steps r91
- Beam Enrich
- Building a Tracker
- CallRail webhook adapter
- CallRail webhook setup
- Campaign attribution enrichment
- Canonical event model
- Canonical event model pre r63
- Canonical event model v70
- Canonical event model v72
- CLA
- Clojure collector
- Cloudfront collector
- Collector logging formats
- Collectors
- Common configuration
- Configurable enrichments
- Configure Scala Kinesis Enrich
- Configure Scala Kinesis Enrich v0.1
- Configure Scala Kinesis Enrich v0.3
- Configure Scala Kinesis Enrich v0.5
- Configure Stream Enrich
- Configure Stream Enrich 0 10
- Configure the Scala Stream Collector
- Configure the Scala Stream Collector v0.1
- Configure the Scala Stream Collector v0.10
- Configure the Scala Stream Collector v0.11
- Configure the Scala Stream Collector v0.15
- Configure the Scala Stream Collector v0.16
- Configure the Scala Stream Collector v0.3
- Configure the Scala Stream Collector v0.5
- Configure the Scala Stream Collector v0.9
- Configuring storage targets
- Configuring the Clojure collector
- Contexts overview
- Contributing
- Contributing to development
- Contributing to documentation
- Cookie extractor enrichment
- Copyright and license
- CPP Tracker
- CPP Tracker setup
- Create a new application in Elastic Beanstalk and upload the WAR file into it
- Currency conversion enrichment
- Custom contexts
- Custom events
- Data modeling documentation
- Developer FAQ
- Documentation terms and conditions
- Download the Clojure collector WAR file or compile it from source
- Elasticsearch Loader
- Elasticsearch Loader Setup
- Elasticsearch Loader Setup 0.9.0
- EmrEtlRunner
- EmrEtlRunner Input Formats
- Enable logging to S3
- Enable support for HTTPS
- Enrichment
- Event dictionary
- Event fingerprint enrichment
- Event fingerprint enrichment 1 0 0
- Event manifest populator
- Events and Contexts
- Events overview
- GCP: Getting Started
- GCP: Setting up Stream Enrich
- GCP: Setting up the Scala Stream Collector
- Getting started analysing your data in Infobright
- Getting started analyzing Snowplow data
- Getting started with data modeling
- Getting started with EMR
- Getting started with Looker
- Glossary
- Golang tracker
- Golang tracker setup
- Google AMP Tracker
- Google AMP Tracker v2
- Hadoop Event Recovery
- Hosted assets
- How to integrate a webhook into Snowplow
- HTTP header extractor enrichment
- HubSpot webhook adapter
- HubSpot webhook setup
- IAB enrichment
- IAM setup
- Iglu registry
- Iglu webhook adapter
- Iglu webhook setup
- Infobright storage
- Install Scala Kinesis Enrich
- Install Scala Kinesis Enrich v0.1
- Install Stream Enrich
- Install Stream Enrich 0 10
- Install Stream Enrich 0 14
- Install the Scala Stream Collector
- Instrumentation
- Integrating Javascript tags onto your website
- Integrating Javascript tags with enhanced ecommerce
- Integrating javascript tags with Google Tag Manager
- Integrating Javascript tags with QuBiT OpenTag
- iOS Tracker
- iOS Tracker Setup
- iOS Tracker Setup 0.1 0.3
- iOS Tracker Setup 0.4
- iOS Tracker Setup 0.5
- iOS Tracker Setup 0.6
- iOS Tracker v0.1
- iOS Tracker v0.2
- iOS Tracker v0.3
- iOS Tracker v0.4
- iOS Tracker v0.5
- iOS Tracker v0.6
- iOS Tracker v0.7
- iOS Tracker v0.8
- IP anonymization enrichment
- IP anonymization enrichment 1 0 0
- IP lookups enrichment
- IP lookups enrichment 1 0 0
- Java Tracker
- Java Tracker Setup
- Java Tracker Setup 0.7
- Java Tracker Setup 0.8
- Java Tracker v0.4
- Java Tracker v0.8
- JavaScript script enrichment
- Javascript Tracker
- Javascript Tracker Cookies and Local Storage
- Javascript Tracker Core
- Javascript tracker core setup
- Javascript tracker setup
- Kinesis at least once processing
- Kinesis Elasticsearch Sink Setup 0.1.0
- Kinesis Elasticsearch Sink Setup 0.4.0
- Kinesis Elasticsearch Sink Setup 0.5.0
- Kinesis Elasticsearch Sink Setup 0.7.0
- Kinesis Elasticsearch Sink Setup 0.8.0
- Kinesis LZO S3 Sink Setup 0.1.0
- Kinesis LZO S3 Sink Setup 0.3.0
- Kinesis LZO S3 Sink Setup 0.4.0
- Kinesis LZO S3 Sink Setup 0.5.0
- Knowledge Base
- Lua Tracker
- Lua tracker setup
- MailChimp webhook adapter
- MailChimp webhook setup
- Mailgun webhook adapter
- Mailgun webhook setup
- Mandrill webhook adapter
- Mandrill webhook setup
- Marketo webhook adapter
- Marketo webhook setup
- Maven Publication
- Modifying snowplow js
- Node.js Tracker
- Node.js tracker setup
- Node.js Tracker v0.1.0
- Node.js Tracker v0.2.0
- Olark webhook adapter
- Olark webhook setup
- Our contributors
- Our users
- PagerDuty webhook adapter
- PagerDuty webhook setup
- PHP Tracker
- PHP Tracker Setup
- PHP Tracker v0.1.0
- PII pseudonymization enrichment
- PII pseudonymization enrichment 1 0 0
- Pingdom webhook adapter
- Pingdom webhook setup
- Pixel tracker
- pixel tracker setup
- PostgreSQL storage
- Product roadmap
- Python Analytics SDK
- Python Analytics SDK Event Transformer
- Python Analytics SDK Run Manifests
- Python Analytics SDK setup
- Python Tracker
- Python tracker setup
- Python Tracker v0.2
- Python Tracker v0.3
- Python Tracker v0.4
- Python Tracker v0.5
- Python Tracker v0.6
- Python Tracker v0.7
- referer parser enrichment
- Relational Database Loader
- Relational Database Shredder
- Ruby Tracker
- Ruby tracker setup
- Ruby Tracker v0.2
- Ruby Tracker v0.3
- Ruby Tracker v0.4
- Ruby Tracker v0.5
- Run Scala Kinesis Enrich
- Run Scala Kinesis Enrich v0.1
- Run Scala Kinesis Enrich v0.3
- Run Stream Enrich
- Run Stream Enrich 0 10
- Run Stream Enrich 0 14
- Run Stream Enrich 0 17
- Run the Scala Stream Collector
- S3 loader
- S3 Storage
- Scala Analytics SDK
- Scala Analytics SDK Event Transformer
- Scala Analytics SDK Event Transformer 0.3.0
- Scala Analytics SDK Run Manifests
- Scala Analytics SDK setup
- Scala Kinesis Enrich
- Scala Stream Collector
- Scala Tracker
- Scala tracker setup
- Scala Tracker v0.1
- Scala Tracker v0.2
- Scala Tracker v0.3
- Scala Tracker v0.4
- Schema registry
- Segment.io Integration
- Self hosting snowplow js
- SendGrid webhook adapter
- SendGrid webhook setup
- Set your tracker to point at the Clojure collector endpoint
- Setting up a Collector
- Setting up a Data Store Source
- Setting up a Tracker
- Setting up a Webhook
- Setting up alternative data stores
- Setting up Amazon DynamoDB
- Setting up Amazon Elasticsearch Service
- setting up beam enrich
- Setting up ChartIO to visualize Snowplow data
- Setting up Druid
- Setting up Druid dependencies
- Setting up Druid for production
- Setting up Druid server
- Setting up Druid single instance
- Setting up EC2 instance for EmrEtlRunner and StorageLoader
- Setting up EmrEtlRunner
- Setting up Enrich
- Setting up Excel to analyze Snowplow data
- Setting up google analytics integration
- Setting up Infobright
- Setting up Kinesis Druid ingest
- Setting up PostgreSQL
- Setting up Qubole to analyze Snowplow data using Apache Hive
- Setting up R to perform more sophisticated analysis on your Snowplow data
- Setting up Redshift
- setting up scala kinesis enrich
- Setting up Snowplow
- setting up snowplow event recovery
- setting up snowplow google cloud storage loader
- setting up stream enrich
- Setting up Tableau to analyze your Snowplow data
- Setting up the Clojure collector
- Setting up the Cloudfront collector
- Setting up the prebuilt views in Redshift and PostgreSQL
- Setting up the Scala Stream Collector
- Setup IAM permissions for a data analyst using EMR
- Setup IAM permissions for operating Snowplow
- Setup IAM permissions for users installing Snowplow
- Shredding
- SnowCannon
- Snowplow Analytics SDK
- Snowplow authored events
- Snowplow Docker
- Snowplow Docker Setup
- Snowplow Event Recovery
- Snowplow Google Cloud Storage Loader
- Snowplow overview
- Snowplow Performance Tuning
- Snowplow project and community
- Snowplow S3 Loader Setup
- Snowplow technical documentation
- Snowplow Tracker Protocol
- Snowplow version matrix
- Software and services thanks
- SQL Query enrichment
- StatusGator webhook adapter
- StatusGator webhook setup
- Storage documentation
- Stream Enrich
- Technical architecture
- Testimonials
- Testing the Javascript tracker is firing
- The Enrichment Process
- Tracker Maintenance Classification
- Tracker Specification
- Trackers
- Tracking your marketing campaigns
- Troubleshooting
- Troubleshooting Clojure Collector instances to prevent data loss
- Troubleshooting jobs on Elastic MapReduce
- ua parser enrichment
- ua parser enrichment 1 0 0
- Unbounce webhook adapter
- Unbounce webhook setup
- Unity Tracker
- Unity Tracker Setup
- Update the EmrEtlRunner configuration YAML file
- Upgrade Guide
- Urban Airship Connect webhook adapter
- Urban Airship Connect webhook setup
- user agent utils enrichment
- Vero webhook adapter
- Vero webhook setup
- Weather enrichment
- YAUAA enrichment
- Zendesk webhook setup
HOME » TECHNICAL DOCUMENTATION » Trackers » Javascript tracker
1. Trackers Overview Javascript Tracker
2. Collectors Overview Cloudfront Collector Clojure Collector (Elastic Beanstalk) Scala Stream Collector
3. ETL Overview EmrEtlRunner
C. Canonical Snowplow event model
4. Storage Overview S3 / Hive Amazon Redshift Infobright
D. Snowplow storage formats (to write)
5. Analytics Analytics-documentation
Common Artifact-repositories