Blake
Blake

Reputation: 73

Google Tag Manager - Restart tracking after event is fired a second time in same session

We currently have some tags on our website, and these are done through GTM, and tracked into our analytics.

One of them for example is on our search, when a customer searches, a tag is fired and we track them in analytics to see if that search converts.

We face a problem though, if somebody searches for example: "canon printer" and it doesn't convert, but then the same user searches for "photo printer" in the same session and that does convert, in our analytics when we view them, it says that both "canon printer" and "photo printer" has converted, when infact they purchased after searching for "photo printer".

Is there a way to stop a tag from tracking if the event was fired again, and then let the later tag follow them about for conversion tracking.

Our website is www.printerbase.co.uk

Thanks, Blake

Upvotes: 0

Views: 523

Answers (2)

mrbubu
mrbubu

Reputation: 484

You can set last search term before transaction as a hit scoped custom dimension of this transaction if this term exists.

This will give you the ability to use this custom dimension as secondary dimension in transaction reports.

This way you will see revenue for search terms.

Upvotes: 0

sdhaus
sdhaus

Reputation: 1896

The easiest solution to get the information that you are trying to get is through using custom dimensions.

As I understand, the problem is that you want to capture only the 'last touch' interaction for search events, and see the resulting conversion rate/revenue.

In this case, I would advise setting up the search term event to additionally send the search terms to a session level custom dimension.

This works, as session level dimensions capture the final value sent through to them.

Caveat: the major caveat of this form of tracking is that if the user continues to search after their purchase, these searches will be the searches attributed to the conversion.

Another option would be to persist the search terms through a cookie or session storage, replacing the existing term with the new term on each search. Then at purchase, send the search term value (retrieved from the cookie/session storage) through to the session level custom dimension.

Caveat: In the case where a single user performs multiple purchases, their last search will be attributed to all of the sessions conversions.

Upvotes: 1

Related Questions