Tag Options via JS Tracking Code

Would someone please confirm that with my JS tracking code set as:

  (function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
  	w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
  	m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://m.domain.com/mtc.js','mt');

  mt('send', 'pageview', {'tags': 'zzz','lang-en',-'lang-es'});

I will set contact tags as zzz and lang-en, while removing tag lang-es ?

Is the above formated correctly?

Does the minus code within or outside the single quotes?

Would appreciate any help.

Based on docs:

https://docs.mautic.org/en/5.x/contacts/manage_contacts.html#tracking-of-custom-parameters

It should be something like:

mt('send', 'pageview', {tags: 'zzz,lang-en,-lang-es'});

1 Like