[Resolved] Tracking Blog Post Comments with GTM

Home Forums Support [Resolved] Tracking Blog Post Comments with GTM

Home Forums Support Tracking Blog Post Comments with GTM

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1412805
    Joseph Sloan

    Hi,

    I’m trying to track comments on blog posts as events in Google Analytics, through Google Tag Manager. I have an AJAX listener for my newsletter sidebar and contact form that work like a charm. But for comments I don’t seem to be catching any meaningful variables. When a comment is posted the page reloads with an anchor link to the comment (example: /hello-world#comment-2). I tried to create a trigger based on URL but the anchor portion of the link is not present in any variables.

    Do you have any suggestions on how I can track blog comments with GTM in generate press?

    #1413273
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I don’t have any experience with this, unfortunately.

    However, this post may help: https://penguininitiatives.com/google-tag-manager-tracking-guide-wordpress/

    I also found this one, but not sure it applies to default WordPress comments: https://www.analyticsmania.com/post/track-comments-with-google-tag-manager/

    #1413285
    Joseph Sloan

    Thank you Tom! Sorry I should have closed this ticket I found a solution. I’m loving generate press and how simple everything has been; great theme!

    Julius at analytics mania is a great resource! The linked article (https://www.analyticsmania.com/post/track-comments-with-google-tag-manager/#default-form-submission) option number two works for tracking Generate Press blog comments.

    #1414002
    Tom
    Lead Developer
    Lead Developer

    Glad you got it working! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.