Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v1-staging' into production-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Mar 8, 2022
2 parents 37b46f8 + 137e177 commit 4e12ba8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@saikumarrs
@MoumitaM
9 changes: 9 additions & 0 deletions integrations/GA/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default class GA {
this.sampleRate = config.sampleRate || 100;
this.trackCategorizedPages = config.trackCategorizedPages || true;
this.trackNamedPages = config.trackNamedPages || true;
this.useRichEventNames = config.useRichEventNames || false;
this.optimizeContainerId = config.optimize || "";
this.resetCustomDimensionsOnPage = config.resetCustomDimensionsOnPage || [];
this.enhancedEcommerceLoaded = 0;
Expand Down Expand Up @@ -622,11 +623,19 @@ export default class GA {

// categorized pages
if (category && this.trackCategorizedPages) {
if (this.useRichEventNames) {
rudderElement.message.event = `Viewed ${category} Page`;
rudderElement.message.type = "track";
}
this.track(rudderElement, { nonInteraction: 1 });
}

// named pages
if (name && this.trackNamedPages) {
if (this.useRichEventNames) {
rudderElement.message.event = `Viewed ${name} Page`;
rudderElement.message.type = "track";
}
this.track(rudderElement, { nonInteraction: 1 });
}
this.pageCalled = true;
Expand Down

0 comments on commit 4e12ba8

Please sign in to comment.