Should a non-developer be touching this code, though? Anyway, I think
if (${trackingEnabled})
is really easy to understand. And less prone to typos.
Or maybe :
if (!${trackingEnabled})
Non developper are not supposed to touch this, BUT I see Marketo admins at my customer who sometimes dig into template code... Or a couple who took the initiative to "correct" the code we had provided.
-Greg
Just for thoughts...
I have put code like this into a token and then included it in the landing page if I desire it.
(It doesn't prevent someone from changing the content of the token, but it is another option.)
But deleting the cookie *entirely* prevents any pages from being logged under the browser's primary user, which may not be desirable (I still want my partners to have their activity logged, I just don't want them logging hits under their referral leads).
Thanks for all the responses everyone!
We have embedded the form onto a page on our website.
Sanford Whiteman thanks for sharing the article. If I am not using a Landing Page, will the script work if I paste it above the form embed code?
Thanks again!
Below, not above.
Thank you Sanford, I've added the code.