Skip to main content

Ad Tracking

Installationโ€‹

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

Initializationโ€‹

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?