Skip to content

Commit

Permalink
Merge pull request #316 from rudderlabs/google-ads-track
Browse files Browse the repository at this point in the history
Fix for when Google Ads track is calling RudderElement.properties ins…
  • Loading branch information
dalyd14 authored Aug 30, 2021
2 parents 8c4fa8d + c8c6f7b commit ae4a49d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions integrations/GoogleAds/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ class GoogleAds {
const { eventName } = conversionData;
const sendToValue = `${this.conversionId}/${conversionLabel}`;
const properties = {};
if (rudderElement.properties) {
properties.value = rudderElement.properties.revenue;
properties.currency = rudderElement.properties.currency;
properties.transaction_id = rudderElement.properties.order_id;
if (rudderElement.message.properties) {
properties.value = rudderElement.message.properties.revenue;
properties.currency = rudderElement.message.properties.currency;
properties.transaction_id = rudderElement.message.properties.order_id;
}
properties.send_to = sendToValue;
window.gtag("event", eventName, properties);
Expand Down

0 comments on commit ae4a49d

Please sign in to comment.