Tagged: google analytics
-
AuthorPosts
-
July 15, 2016 at 10:52 pm #661555
Hi,
I’ve inserted this code to track what links are clicked on:
<a href="ab.com/c.html" onClick="ga('send', 'event', 'Contact', 'Directions', 'Map');">abc</a>
After I save the text and update the page, I view the hyperlink again and all I see is this:
<a href="ab.com/c.html">abc</a>
I’m adding/viewing/changing this code while in TEXT mode.
It seems that Enfold is purposely stripping out this code. I need to get this resolved. I’m able to get this working in other themes (e.g. Dante) without issue.
Thanks
- This topic was modified 8 years, 5 months ago by slui.
July 17, 2016 at 1:52 pm #661751Hi slui,
Thanks for the login details, on what page are you trying this?
Thanks,
RikardJuly 17, 2016 at 2:12 pm #661759Hi
I’m executing this on the contact page on the phone number or any hyper link.
Sl
July 19, 2016 at 4:45 pm #662623Any thoughts on this?
July 20, 2016 at 2:04 pm #662959Hi,
use a Code Block element instead of a text element for your code.
Best regards,
AndyJuly 22, 2016 at 5:48 pm #664000Hi Andy,
I don’t want the analytics code to show up on the website. I want to be able to track the link when it is clicked. The analytics code needs to be hidden from the user.
sl
July 25, 2016 at 11:27 am #664543Hi,
that’s why I told you to use a Code Block Element instead.
Best regards,
AndyJuly 26, 2016 at 10:32 pm #665514Hi Andy,
Thanks but that doesn’t resolve the situation because now I can’t do line breaks for each line. If I’m using a TEXT element I can the following display:
EMAIL & PHONE Email: (Email address hidden if logged out) Toll Free: 1-855-XXX-XXXX Phone: 905-XXX-XXXX Fax: +1-905-XXX-XXXX
If I use the code block as you had suggested I get the following:
EMAIL & PHONE Email: Email: (Email address hidden if logged out) Toll Free: 1-855-XXX-XXXX Phone: 905-XXX-XXXX Fax: +1-905-XXX-XXXX
So yes, I may get the Google analytics code but I can’t get the email and phone numbers to be on separate lines. They are basically one line. Even if I use the <br> code, it still doesn’t put the email and phone into separate lines.
sl
July 26, 2016 at 10:42 pm #665520I also tried to use <p> for each line. Although that worked, the vertical spacing between each line was significantly bigger than the text just in a TEXT element.
July 26, 2016 at 10:52 pm #665524Sorry I also take back the fact that the CODE BLOCK does indeed strip away the Analytics code as well. I made a mistake in my answer above.
July 27, 2016 at 3:22 am #665578 -
AuthorPosts
- The topic ‘Enfold Text Element Stripping Out Google Analytics Code’ is closed to new replies.