AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.2K members online now
4.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Can't Delete Google Analytics Shortcode in WP Plugin

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm taking over for a previous developer to manage our website. In the additional settings of one of our Contact form plugins  ("Contact Form 7") there is the following shortcode:

 

on_sent_ok: "try {__ctm.tracker.trackEvent("", " ", "form"); __ctm.tracker.popQueue(); } catch(e) { console.log(e); }"

 

We have a new SEO team taking over and this previous interferes with their analytic code that they're trying to add. But when I delete it from the "Additional Settings" textbox it re-populates after the save. Sometimes it repopulates 2 copies of the same code. I've been trying to figure out if it's the way we've configured contact form 7 or analytics or some other third party app we use (like hubspot).

 

But I thought I'd ask you guys first. Does analytics auto repopulate shortcodes like this when they get deleted? Is there any way I can block this code from coming back or delete it permanently? I tried commenting out our analytics script entirely in our header and it still comes back. I should also mention that this code appears when I create a new form as well. I've tried looking at the CF7 docs but haven't found anything helpful.

 

I appreciate it if anyone can lend a hand.

 

1 Expert replyverified_user

Re: Can't Delete Google Analytics Shortcode in WP Plugin

Top Contributor
# 2
Top Contributor
Hi Aaron :-)
the repopulation sounds like an issue with Contact Form 7, not analytics.
Have you asked on their plugin support forum?
https://wordpress.org/support/plugin/contact-form-7
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here