Skip to content

Commit

Permalink
added three additional settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchiramoitra committed Jul 29, 2021
1 parent 3800252 commit 39934a4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions integrations/GoogleAds/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class GoogleAds {
this.pageLoadConversions = config.pageLoadConversions;
this.clickEventConversions = config.clickEventConversions;
this.defaultPageConversion = config.defaultPageConversion;

this.sendPageView = config.sendPageView;
this.conversionLinker = config.conversionLinker;
this.disableAdPersonalization = config.disableAdPersonalization;
this.name = "GOOGLEADS";
}

Expand All @@ -30,7 +32,18 @@ class GoogleAds {
window.dataLayer.push(arguments);
};
window.gtag("js", new Date());
window.gtag("config", this.conversionId);

// Additional Settings

const config = {};
config.send_page_view = this.sendPageView;
config.conversion_linker = this.conversionLinker;

if (this.disableAdPersonalization) {
window.gtag("set", "allow_ad_personalization_signals", false);
}

window.gtag("config", this.conversionId, config);

logger.debug("===in init Google Ads===");
}
Expand Down

0 comments on commit 39934a4

Please sign in to comment.