Skip to main content

For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/sources/web-trackers/previous-versions/browser-tracker-v3-reference/plugins/ad-tracking.md. The index of all documentation pages is at https://docs.snowplow.io/llms.txt, and the index for this section is at https://docs.snowplow.io/docs/api-reference/llms.txt.

Ad Tracking

caution
You are reading documentation for an outdated version. Here's the latest one!

Latest release version badge for the Snowplow JavaScript Tracker

Installation​

  • npm install @snowplow/browser-plugin-ad-tracking
  • yarn add @snowplow/browser-plugin-ad-tracking
  • pnpm add @snowplow/browser-plugin-ad-tracking

Initialization​

javascript
import { newTracker, trackPageView } from '@snowplow/browser-tracker';
import { AdTrackingPlugin, trackAdClick } from '@snowplow/browser-plugin-ad-tracking';

newTracker('sp1', '{{collector_url}}', {
appId: 'my-app-id',
plugins: [ AdTrackingPlugin() ],
});

Functions​

trackAdImpressionDocumentation
trackAdClickDocumentation
trackAdConversionDocumentation

Context​

This plugin does not add any additional data to context of an event.

Was this page helpful?