2

This is on a Wordpress/WooCommerce site, utilising Google Tag Manager (via a plugin called GTM4WP).

Is there a way to track when someone lands on the site via a blog article, and then they end up making a purchase on the site?

What I'd like to achieve is to see the number and value of sales that occur via people landing on the site via our blog articles.

I was considering (within GA) setting up a goal, with a funnel, but tracking the steps is all URL based. I can't identify a page as a blog article just from the URL.

So I was looking at how this might be achieved with Google Tag Manager.

For instance, when the user views a blog article, a gtm4wp.reading.articleLoaded event object is in the data layer, and that object has a value in it for pagePostType. It will be set to post when user is viewing a blog post.

So what I am thinking is that gives me a way to identify when the user enters the site through a blog article. The checkout process has a purchase event in it, which gives me a way to track when they buy something.

So ... my question is: Given the above scenario, is there a way to track when a user lands (enters the site) via a blog post, and eventually makes a purchase? And then see in GA the number of times this occurs, and the total value of the purchases?

2 Answers 2

3
  1. You still can do it via GA. But you would have to go through the custom reports route. Although, generic reports have the ability to do it too. Anyhow, it allows you setting regex-based filters. That is, if there is something indicating blog in the url. You would want to filter the landing page dimension and then drop your goal/conversion metric. No need to do anything in GTM really.

  2. You can do it through GTM too. Through a custom dimension. By, say, setting the site section in GTM for a session-scope custom dimension. And use cookies to make sure you're not resetting it once it's set. You can determine the site section from either url, or DOM. There's a lot of freedom in GTM. Or, yes, if you already have the datalayer events and vars indicating the page type, using that would be best.

Solving it through GTM is really annoying/not elegant. I would suggest going with native GA filters if possible.

1

Using your described scenario..
In GA, create a custom dimension Page/Post Type and set it to hit scope.

In GTM create a dataLayer variable and grab the value of pagePostType and send it along as a custom dimension with your Pageview tag.

In GA create a custom segment based on sequence:
Include > Users > Sequence Start: First user interaction
Step 1
Landing Page matches regex .*
and
Custom Dimension exactly matches post
followed by
Step 2
Transaction per user greater than 0

For some great reading on custom sequence segments I recommend the following article:
https://www.bounteous.com/insights/2016/04/04/more-accurate-conversion-data-sequence-segments/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.