Best practice for creating a custom metric in GA

Bronze Contributor
Bronze Contributor

Hi,

I'm new to using tealium for GA implementation and just have a best practice question, which i think is fairly basic but I just want to make sure I get it right.

I want to implement a custom metric and the metric only fires on a specific page, the confirmation page. 

My main Tealium GA tag has the load rule to fire on all pages on my domain but I don't want this metric to fire on all pages (it only exists on one page). How can I restric the metric to only fire on the intended page? Do I need to create a new Tealium GA tag for the page in question or is there a way I can restrict the metric in the existing tag?

Thanks.

Frank

4 REPLIES 4

Best practice for creating a custom metric in GA

Tealium Expert
Tealium Expert

Hi Frank

There should only be one GA tag, and unless really required by your implementation(which in my estiamtion is pretty rare) the norm is to ave the load rule fire on all pages. 

To control when the metric is sent to GA, you control when the variable feeding the metric in the tag is populated. 

You can do this by using the conditions in the extentsion to only populate with the value your want when you want. 

So if you put a condition to only populate when that page appears (you can use url, or any of the data object vars you specified in your data object implemenation, or to be frank any set of conditions thatt match the circumstance), that should acheive what you want. 

 

Gavin

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -

Best practice for creating a custom metric in GA

Bronze Contributor
Bronze Contributor

Hi Gavin,

Thanks for your reply, I really appreciate it.

Just to make sure I understood what you wrote, I need to make sure the data layer object only populates on the page(s) I need it to and that is the way I limit it from being set on the wrong pages?

Thanks,

Frank

Best practice for creating a custom metric in GA

Tealium Expert
Tealium Expert

Hi Frank Correct. 

 

Whatever data layer object you have mapped in the tag, use an extention to popualte it and set theconditions as to when that should happen in theextention itself. 

G

 

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -

Best practice for creating a custom metric in GA

Bronze Contributor
Bronze Contributor

Agreed with Gavin, you should populate that variable only on the pages that you want it to fire, then only when the variable is populated the data will be sent back to GA through the tag.

Public