sahava / googletagmanagertemplates Goto Github PK
View Code? Open in Web Editor NEWCustom templates for Google Tag Manager
License: MIT License
Custom templates for Google Tag Manager
License: MIT License
Please review my next custom template and let me know your thoughts and suggestions for improvement.
dataLayer Builder + EE.zip
Simo,
I have added my datalayer builder w-standard ecommerce tml (zip) file as an issue as you have requested. Please review the template and let me know your thoughts, suggestions, and thank you for being a GTM super hero! :)
Hey Simo,
Thanks a lot for your great effort here. Your work has been super useful in constructing templates. I was wondering if you could look at the base code available for adobe sdk and give some direction on how it can be converted into a template? The min.js bit is easy, just injecting the script but the base code is where I am not able to work out how it can be changed. Below is the code. https://experienceleague.adobe.com/docs/experience-platform/edge/fundamentals/installing-the-sdk.html?lang=en
Totally understand if you are too busy and not able to work, below is my code.
`const injectScript = require('injectScript');
const copyFromWindow = require('copyFromWindow');
const aliasInWindow = require('aliasInWindow');
const setInWindow = require('setInWindow');
const log = require('logToConsole');
const createArgumentsQueue = require('createArgumentsQueue');
const callLater = require('callLater');
function getAlloy(){
let alloy = copyFromWindow('alloy');
if(alloy){
return alloy;
}
alloy = createArgumentsQueue('__alloyNS', 'alloy');
return alloy;
}
const alloy = getAlloy();
const url = "https://cdn1.adoberesources.net/alloy/"+data.version+"/alloy.min.js";
injectScript(url, data.gtmOnSuccess, data.gtmOnFailure, url);
setInWindow('alloy',alloy);`
New Template to replicate GTM Zones in free GTM.
Hi Sahava,
First of all, thanks for you time explaining and doing all these templates for Tag Manager.
I am using the Facebook Template, but I had an issue with it. I have all parameters i would like to send to facebook in a object, for attaching it with the event, but your template does not send them.
I fixed the problem changing a variable in your code.
I copy here the code you have in your template when:
// Call the fbq() method with the parameters defined earlier
fbq(command, pixelId, eventName, objectProps);
I changed "objetProps" for "finalObjectProps". This last one is the variable you have when you merge de "objetcProps" with "objectPropsFromVar".
And it works!
Please, have a look if I am right and you could update the template code.
Kind Regards
Hi,
Thanks for providing this GTM template library resource. I was looking into the unofficial Facebook Pixel template and perhaps migrating existing fbq related Custom HTML tags due the user friendly aspect.
One thing I was interested in understanding is implementing the consent mechanism Facebook have into the template setup:
Currently, I have this implemented in the "All Pages" Facebook Pixel with the init code. I am currently using a lookup table on a specific cookie being present and that returning "allow" or "deny" depending on the condition.
However I was wondering what the best way to achieve this would be under the template setup? I can see fbq('init', pixelId, initObj);
in the sandbox JavaScript of the template. Would the best to do create a field to hold a value or variable that would ultimately return "allow" or "deny". Could I then add something like before the init call:
fbq('consent', data.consent);
Into the existing code?
Thanks in advance!
I have updated the template (.tpl) file with all our your requested updates and reformatted the date in the table and saved the README file using the .md extension as requested.
I have pushed the updated files in my forked repository and uploaded the zip file in this issue that contains both files.
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.