stape-io / awin-tag Goto Github PK
View Code? Open in Web Editor NEWAwin Tag for Google Tag Manager Server Side
Home Page: https://stape.io/blog/awin-server-to-server-tracking-using-server-google-tag-manager
License: Apache License 2.0
Awin Tag for Google Tag Manager Server Side
Home Page: https://stape.io/blog/awin-server-to-server-tracking-using-server-google-tag-manager
License: Apache License 2.0
Firstly thanks for building out this template it been really great to us and saved me a lot of time.
I have a issue with the product level tracking in the template due to the fact that our business include a pipe string of our component for a item_id For example P123|A123|D123. The replace method of the code does not encode or replace | leading to additional column in the product level tracking.
I know this is an edge case issues, and I tried to fix this issue myself with the following changes to the code but it does not appear to be working
I also dont see any console logs from your template even when in debug mode. Could not work out why.
Any help would be amazing.
const productRow =
'AW:P|{{advertiserId}}|{{orderReference}}|{{productId}}|{{productName}}|{{productItemPrice}}|{{productQuantity}}|{{productSku}}|{{commissionGroupCode}}|{{productCategory}}';
if (getType(items) === 'array') {
items.forEach((item, index) => {
let item_id = item.item_id || '';
item_id.replace('|','/');
let value = productRow.replace(
'{{advertiserId}}',
item.advertiser_id || data.advertiserId || ''
);
value = value.replace(
'{{orderReference}}',
item.order_reference || eventData.transaction_id || ''
);
value = value.replace('{{productId}}', item_id || '');
value = value.replace('{{productName}}', item.item_name || '');
value = value.replace(
'{{productItemPrice}}',
getPriceString(item.price)
);
value = value.replace('{{productQuantity}}', item.quantity || '');
value = value.replace(
'{{productSku}}',
item.item_sku || item_id || ''
);
value = value.replace(
'{{commissionGroupCode}}',
item.commission_group_code || 'DEFAULT'
);
value = value.replace(
'{{productCategory}}',
item.item_category || ''
);
requestUrl = requestUrl + '&bd[' + index + ']=' + value;
});
}
hey guys,
regarding this https://wiki.awin.com/index.php/Consent_Frameworks_for_Advertisers about consent information. please check if there is an update necessary for your template.
in our usecase a had to implement it on client side.
please let us know
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.