Analytics
2.1K members online now
2.1K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Event based on its source/medium

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there,

 

Is it possible to build up an event, only triggered when it comes from only a certain source/medium?

 

Thanks,

 

Kutlu

1 Expert replyverified_user

Event based on its source/medium

Rising Star
# 2
Rising Star

Could you provide more info on what you'd like to do?

 

On what action will the event fire? Also, will it fire on a landing page only, i.e. the first page of a session, or not necessarily?

 

Are you making use of GTM? 

Event based on its source/medium

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Rodrigues, 

 

Say that I would like to follow how many sign ups I generate. 

 

For sign ups, I have set up already an event. When visitor clicks on sign up button, it gets fired. 

 

But I want that it is only fired when the visitor comes from my Google Adwords campaign. 

 

I can make use of segmenting and so on but I want to get it more direct so I just want to get the event trigered when the source is Google.

 

Make sense?

Event based on its source/medium

Rising Star
# 4
Rising Star

An option is to store source/medium in a cookie and fire the event based on the cookie value. Does this work for you?

 

 

Event based on its source/medium

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

thanks! It seems a good idea.

 

How can I store the source/medium in a cookie? Is it possible to get that source/medium info as label of the event, then?

Event based on its source/medium

Rising Star
# 6
Rising Star

I'm assuming your GA version is Universal Analytics, in which case you can't store source/medium as GA displays it in reports in a cookie because unlike Classic Analytics which stored source/medium in a cookie on the browser, Universal Analytics handles it in the server.

 

You can, however, make use of the AdWords query string (autotagging enabled) to identify its traffic, store this info in a cookie and fire the event based on it.

 

When users hit your ad they should land on a page like so www.yoursite.co.uk?gclid=CjwKEAiAkuLDBRCRguCgvIT and this gclid is what identifies AdWords traffic.

 

If you're making use of GTM, then it shouldn't be difficult to make the whole thing works, although you may need the help of a developer. The steps are:

 

1 - On landing pages, verify if gclid= is present in URL

2 - If so, store the value AdWords in myCookieName, otherwise store the value OtherSource

3 - Create a Variable of 1st Party Cookie with a value of myCookieName

4 - Use myCookieName as a condition in a Trigger with a value of AdWords

5 - Use this Trigger to fire the event Tag.

 

The trigger will also need another condition to identify button clicks in the said signup form.

 

Let me know if it makes sense.