Skip to content

Commit c374d19

Browse files
author
Paul Boocock
committed
Fix Plugin setup documentation in the READMEs (close #917)
1 parent 3ab51b6 commit c374d19

File tree

19 files changed

+25
-50
lines changed

19 files changed

+25
-50
lines changed

plugins/browser-plugin-ad-tracking/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the AdTrackingPlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { AdTrackingPlugin } from '@snowplow/browser-plugin-ad-tracking';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ AdTrackingPlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ AdTrackingPlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
Then use the `trackX` functions from this package to track to all trackers which have been initialized with this plugin:

plugins/browser-plugin-ad-tracking/src/index.ts

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,8 @@ export function AdTrackingPlugin(): BrowserPlugin {
5757
/**
5858
* Track an ad being served
5959
*
60-
* @param string impressionId Identifier for a particular ad impression
61-
* @param string costModel The cost model. 'cpa', 'cpc', or 'cpm'
62-
* @param number cost Cost
63-
* @param string bannerId Identifier for the ad banner displayed
64-
* @param string zoneId Identifier for the ad zone
65-
* @param string advertiserId Identifier for the advertiser
66-
* @param string campaignId Identifier for the campaign which the banner belongs to
67-
* @param object Custom context relating to the event
68-
* @param timestamp number or Timestamp object
60+
* @param event The event information
61+
* @param trackers The tracker identifiers which the event will be sent to
6962
*/
7063
export function trackAdImpression(
7164
event: AdImpressionEvent & CommonEventProperties,
@@ -81,17 +74,8 @@ export function trackAdImpression(
8174
/**
8275
* Track an ad being clicked
8376
*
84-
* @param string clickId Identifier for the ad click
85-
* @param string costModel The cost model. 'cpa', 'cpc', or 'cpm'
86-
* @param number cost Cost
87-
* @param string targetUrl (required) The link's target URL
88-
* @param string bannerId Identifier for the ad banner displayed
89-
* @param string zoneId Identifier for the ad zone
90-
* @param string impressionId Identifier for a particular ad impression
91-
* @param string advertiserId Identifier for the advertiser
92-
* @param string campaignId Identifier for the campaign which the banner belongs to
93-
* @param object Custom context relating to the event
94-
* @param timestamp number or Timestamp object
77+
* @param event The event information
78+
* @param trackers The tracker identifiers which the event will be sent to
9579
*/
9680
export function trackAdClick(
9781
event: AdClickEvent & CommonEventProperties,
@@ -107,17 +91,8 @@ export function trackAdClick(
10791
/**
10892
* Track an ad conversion event
10993
*
110-
* @param string conversionId Identifier for the ad conversion event
111-
* @param number cost Cost
112-
* @param string category The name you supply for the group of objects you want to track
113-
* @param string action A string that is uniquely paired with each category
114-
* @param string property Describes the object of the conversion or the action performed on it
115-
* @param number initialValue Revenue attributable to the conversion at time of conversion
116-
* @param string advertiserId Identifier for the advertiser
117-
* @param string costModel The cost model. 'cpa', 'cpc', or 'cpm'
118-
* @param string campaignId Identifier for the campaign which the banner belongs to
119-
* @param object Custom context relating to the event
120-
* @param timestamp number or Timestamp object
94+
* @param event The event information
95+
* @param trackers The tracker identifiers which the event will be sent to
12196
*/
12297
export function trackAdConversion(
12398
event: AdConversionEvent & CommonEventProperties,

plugins/browser-plugin-browser-features/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the BrowserFeaturesPlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { BrowserFeaturesPlugin } from '@snowplow/browser-plugin-browser-features';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ BrowserFeaturesPlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ BrowserFeaturesPlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
## Copyright and license

plugins/browser-plugin-client-hints/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the BrowserFeaturesPlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { ClientHintsPlugin } from '@snowplow/browser-plugin-client-hints';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ ClientHintsPlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ ClientHintsPlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
## Copyright and license

plugins/browser-plugin-consent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the ConsentPlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { ConsentPlugin } from '@snowplow/browser-plugin-consent';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ ConsentPlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ ConsentPlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
Then use the available functions from this package to track to all trackers which have been initialized with this plugin:

plugins/browser-plugin-ecommerce/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the EcommercePlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { EcommercePlugin } from '@snowplow/browser-plugin-ecommerce';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ EcommercePlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ EcommercePlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
Then use the available functions from this package to track to all trackers which have been initialized with this plugin:

plugins/browser-plugin-enhanced-ecommerce/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the EnhancedEcommercePlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { EnhancedEcommercePlugin } from '@snowplow/browser-plugin-enhanced-ecommerce';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ EnhancedEcommercePlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ EnhancedEcommercePlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
Then use the available functions from this package to track to all trackers which have been initialized with this plugin:

plugins/browser-plugin-error-tracking/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the ErrorTrackingPlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { ErrorTrackingPlugin } from '@snowplow/browser-plugin-error-tracking';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ ErrorTrackingPlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ ErrorTrackingPlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
Then use the available functions from this package to track to all trackers which have been initialized with this plugin:

plugins/browser-plugin-form-tracking/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the FormTrackingPlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { FormTrackingPlugin } from '@snowplow/browser-plugin-form-tracking';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ FormTrackingPlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ FormTrackingPlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
Then use the available functions from this package to track to all trackers which have been initialized with this plugin:

plugins/browser-plugin-ga-cookies/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Initialize your tracker with the GaCookiesPlugin:
3636
import { newTracker } from '@snowplow/browser-tracker';
3737
import { GaCookiesPlugin } from '@snowplow/browser-plugin-ga-cookies';
3838

39-
newTracker('sp1', '{{collector}}', { Plugins: [ GaCookiesPlugin() ] }); // Also stores reference at module level
39+
newTracker('sp1', '{{collector}}', { plugins: [ GaCookiesPlugin() ] }); // Also stores reference at module level
4040
```
4141

4242
## Copyright and license

0 commit comments

Comments
 (0)