Adding fireing rules for extensions

Gold Contributor
Gold Contributor

Hi Dev-Team,

 

In comparsion to Google Tag Manager we think It would be a great improvement to have fireing rules for extensions be implemented instead of repeatedly inserting manual code in each extension. Though, we would like to suggest:

 

To be able to schedule fireing of extensions on certain conditions, e.g. DOM-Complete or custom conditions, by haveing fireing rules for extensions be implemented. As follows two examples:

 

  1. Broken images
    Sub-resources are loaded after DOM Ready which is already implemented as a default scope. Though, we think scope is kind of mis-interpreted at this position since DOM Ready is more related to a condition.
    document.addEventListener("DOMContentLoaded", function domComplete(event) {return "true";});
  2. Fire extension on DEV/QA Environment
    To prevent acidential publishing of extension a fireing condition should be available to execute extensions on certain conditions. As follows a code which check for DEV/QA
    window.is_not_Prod = ((function(a) {if(utag.cfg.path.indexOf("prod") <= 0) return true})()) ? 'true' : 'false';

 

Is it possible to add custom load rules for extensions as Googel Tag Manager provides them?

 

Kind regards

Mike

1 REPLY 1

Adding fireing rules for extensions

Gold Contributor
Gold Contributor

Hi folks,

 

as some expressed their interrest in being able to schedule the execution of extensions here is a new one. It checks if it's the start of the session and executes whatever you like:

 

if (document.cookie.indexOf("$_ss:1") >= 0) {//Magic comes here}

 

I used this to send an GA Event with the UTAG Version (utag.cfg.v) number as we recognized that deprecated scripts are still being served quite a long time (cache issues?). more about utag_main cookie values are documented here.

 

Cheers

Mike

Public