• Arlo

    (@arlo)


    I’m testing out Gravitate Event Tracking, and it works well, except for anchor links, or any links that doesn’t load a new page.

    The first click of a link on a page will register properly, but subsequent clicks just repeat the first one. Below is a sample console output, where the second click is a different item, but registering the same as the first one.

    [Log] GETGA: Selector click (#jump_menu a) (summary, line 1544)
    [Log] GETGA: Sent to Universal Tracking [ ga('send', 'event', 'jump menu', 'jump', 'jump_#board-highlights '); ] (summary, line 1590)
    [Log] GETGA: Still could NOT Found selector (.gtrack) Will try and add the listener anyways. (summary, line 1644)
    [Log] GETGA: Selector click (#jump_menu a) (summary, line 1544)
    [Log] GETGA: Sent to Universal Tracking [ ga('send', 'event', 'jump menu', 'jump', 'jump_#board-highlights '); ] (summary, line 1590)

    The selector I am using is #jump_menu a

    Do i need to use a different syntax for this to work, is it a bug with the plugin, or perhaps something else?

    Thanks,
    Steve

    https://www.ads-software.com/plugins/gravitate-event-tracking/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gravitate

    (@gravitate)

    Sorry, but I don’t understand the issue. Clicking on the link again should still run the code. Are you wanting it to only register the event only on the first click or is there something that I am missing?

    Thread Starter Arlo

    (@arlo)

    Clicking a subsequent link does run the code, but it’s returning the wrong link.
    Say I have three links:

    <a href="#one">
    <a href="#two">
    <a href="#three">

    If I click on #one, I get 'jump_#one' in console, which is correct.
    However, if I then click on #two, I get 'jump_#one' again, not 'jump_#two' as expected. And any further links on that page will continue to only return 'jump_#one' .

    In short, the first anchor link I click on a page is incorrectly being applied to all subsequent clicks of other links. I hope this makes sense.

    Plugin Author Gravitate

    (@gravitate)

    Gotcha, This seems it is more related to the hash rather then additional links. Can you confirm if it is happening only on hash links and not others.

    You can try target=”_blank” to confirm.

    Thread Starter Arlo

    (@arlo)

    It’s happening with a _blank link as well.

    Thread Starter Arlo

    (@arlo)

    Hi, any update on this bug?

    Plugin Author Gravitate

    (@gravitate)

    Hi Arlo,
    Just posted an Update that should resolve your issue along with some other updates.
    Please let me know if you run into any issues.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Gravitate not registering subsequent anchor links’ is closed to new replies.