This issue is similar to https://www.drupal.org/node/2455029

I am running an international site, and each country's office wants to be able to set up their own GTM account in order to handle tracking codes per country. When I was trying to accomplish something similar with Google Analytics only, I found that the module made the account number a variable exposed to the Variables module, which allowed me to have one account per country context.

I am working on a patch to make this possible, and will submit in a later comment.

CommentFileSizeAuthor
#1 gtm_variables-2529342-1.patch2.76 KBlaboratory.mike

Comments

laboratory.mike’s picture

Status: Active » Needs review
StatusFileSize
new2.76 KB

OK, I've created a patch, with the changes in the .module file. Since I see that the maintainer's taste with this kind of code could be different, it should be possible to create an inc file if needed. However, the current setup makes including the file in all contexts (admin form, pages, etc.) less than straightforward, so please inform on how best to include the variable declaration.

danepowell’s picture

Seems like a dupe of #2342557: Add variable support

solotandem’s picture

Assigned: laboratory.mike » solotandem
Status: Needs review » Fixed

Implemented by commit indicated on #2342557-5: Add variable support. Will change status to closed duplicate unless someone reports otherwise. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.