Highlighted

Check if two variables are equal

Silver Contributor
Silver Contributor

Hi,

Is there a way within an extension to check if two variables have equal values?

 

I'm trying to stop Google Analytics from firing a transaction everytime the confirmation page is reloaded.

 

My strategy would be to create a persist data layer extension that grabs the order ID and keeps it for the Visitor, refreshing it on pageview, and then creating a set data values extension that would set the enhanced ecommerce action to empty (instead of purchase, which is in utag_data on the confirmation page) when this cookie is equal to the order ID.

 

Is this something that is feasible with extensions? Or is Javascript my only option?

 

Thanks

1 REPLY 1
Highlighted

Check if two variables are equal

Employee Emeritus

Hi @audrey_poulin,

The only option to compare the values of two variables would be in a JavaScript extension.

 

Please let us know if you have any other questions.

 

Thanks!