• Resolved Robibob

    (@robibob)


    Hi,
    since August I get a notification in GA saying “Bad Event Tracking Code”.

    Here is the whole message:
    “The Landing Pages report has a (not set) entry.

    A pageview hit must precede event hits in order for the event hits to include the page that they fire from. When event hits aren’t preceded by a pageview, Google Analytics doesn’t have the page for the event hits, so their page is (not set).

    Verify that tracking code for property xxx xxx sends a pageview hit before sending any events.

    Google Tag Assistant Recordings can help you verify that your hits are sent in the correct order.”

    I used the Gtag code from the admin but same notification.

    Whats going on?
    Google changed there code?

    Thanks!
    /Robert

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Hi @robibob, glad to help. Can you let me know which plugin settings you have modified to implement event tracking?

    Thread Starter Robibob

    (@robibob)

    Hi,
    I did not do any settings, just added the tracking ID and selected analytics.js alternative. And I did not change any settings in GA.

    I used same tracking code before but in August I started to get this notification in GA. The tracking code that is used is the code the plugin adds.

    Thanks!
    /Robert

    Plugin Author Jeff Starr

    (@specialk)

    Okay so if you are just using the default tracking code (i.e., you entered tracking number and chose an analytics option, nothing else), then the code that is added to your pages is not configured event tracking. Which would explain why it is not working.

    Thread Starter Robibob

    (@robibob)

    I’m not familiar with event tracking.
    I did not change any settings in GA so I don’t understand why I’m getting this notification now.

    Thanks!

    Thread Starter Robibob

    (@robibob)

    Thsi is from the notification:

    A pageview hit must precede event hits in order for the event hits to include the page that they fire from. When event hits aren’t preceded by a pageview, Google Analytics doesn’t have the page for the event hits, so their page is (not set).

    Verify that tracking code for property xxx xxx sends a pageview hit before sending any events.

    Plugin Author Jeff Starr

    (@specialk)

    “Verify that tracking code for property xxx xxx sends a pageview hit before sending any events.”

    That is the issue right there: the plugin as you have it configured is not set up to do event tracking. So the required data will not be sent. So when you try to access event tracking data it will not be available.

    Here are the official docs for Google Event Tracking:

    https://developers.google.com/analytics/devguides/collection/analyticsjs/events

    If you compare the code they provide with the code that is output on your pages, you will see the difference, what is missing, etc.

    Thread Starter Robibob

    (@robibob)

    Okay but I don’t understand I’m using the code your plugin is adding
    and di not do anything other changes.

    Where does this event thing comes from?

    Thanks!

    Plugin Author Jeff Starr

    (@specialk)

    That is because by default, the plugin does not provide event tracking code. When you enter the tracking code and choose an analytics method (and make no other changes), the plugin adds the general/basic tracking code. In order to set up event tracking, additional steps are required, as explained in the Google doc I linked previously. I would recommend reading thru that doc to learn more about what’s required, etc.

    Thread Starter Robibob

    (@robibob)

    Okay I understand about the tracking code but I have not added any event tracking on my page.

    And I did not change anything on the site or in GA.
    I just suddenly got this notification.

    Could it be a plugin making this event tracking?

    Thanks!

    Plugin Author Jeff Starr

    (@specialk)

    I don’t know, it could be that Google recently added a message for missing event tracking code, or it could be another plugin that is interfering or adding its own code, or it could be something your theme might be doing, or some other plugin (like a cache plugin) is doing something weird.. it really depends on the setup and what you’ve got going, what Google is doing, etc.

    Thread Starter Robibob

    (@robibob)

    Yes that must be that Google now reports this but how to find out whats generating these events.

    I search the site code for ga event code but only find it in the tracking code.

    Does it need to be some code on the page to track events or is it just set up in GA?

    Thanks!

    Thread Starter Robibob

    (@robibob)

    Should I use the gtag option instead?

    Thanks!

    Plugin Author Jeff Starr

    (@specialk)

    Yeah you can try that, it really all depends on your goals etc. The plugin, for its part, simply makes it easy to add the tracking code as needed. It doesn’t do anything other than that.

    Plugin Author Jeff Starr

    (@specialk)

    Hey @robibob, I hope you got this sorted. It’s been awhile with no reply so gonna go ahead and mark this thread as resolved to help keep the forum organized. Feel free to post again with any further questions or feedback, Thank you.

    Thread Starter Robibob

    (@robibob)

    Yes sorry this had nothing to do with this plugin.
    GA suggested that the tracking code was wrong and wrongly implemented but thats not the case.

    It seems to be related to referrer spam that causes landing page “not set” records.

    Thanks!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Bad Event Tracking Code’ is closed to new replies.