Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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 7 years, 8 months ago by slui.
    #661751

    Hi slui,

    Thanks for the login details, on what page are you trying this?

    Thanks,
    Rikard

    #661759

    Hi

    I’m executing this on the contact page on the phone number or any hyper link.

    Sl

    #662623

    Any thoughts on this?

    #662959

    Hi,

    use a Code Block element instead of a text element for your code.

    Best regards,
    Andy

    #664000

    Hi 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

    #664543

    Hi,

    that’s why I told you to use a Code Block Element instead.

    Best regards,
    Andy

    #665514

    Hi 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

    #665520

    I 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.

    #665524

    Sorry 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.

    #665578

    .

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Enfold Text Element Stripping Out Google Analytics Code’ is closed to new replies.