- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
06-06-2019 04:59 AM
Hi Team,
Following is my CODE:
var userAmount = $('.ember-view.ember-text-field.form-control.amount').val();
s.events="event1, event16";
s.pageName = "Payment Complete";
s.eVar13=amount;
s.t();
I am capturing amount transacted in varaible "userAmount" using jquery. Now i need to capture same amount in currency event (event16). Can any one tell be exact code which is need to be written.
The above code is written in jQuery onHandler 1.7 extension and scope is DOM ready.
Thanks in advance.
Solved! Go to Solution.
06-07-2019 02:44 AM
Hi
with no context around this, i doubt you are going to get a reply that will be helpful.
Can you expand on this.
Tag tech
Circumstance
use case
etc...
06-07-2019 03:00 AM
I am tracking payment journey. There are 4 steps, in the last step i am capturing the "amount" transacted by user. I am able to capture the currency value (picking value from the form when user submit) in an evar. Now i want to put this value in currency event as well. I have written the code above which i am using in my extension (jQuery Handler).
Can any one help me how to put the amount value in currency event.
06-07-2019 07:08 AM
06-08-2019 04:19 AM
Hi @parth_gupta199 ,
Tyr using the below code, to capture the value of currency event,
var userAmount = $('.ember-view.ember-text-field.form-control.amount').val();
var currencyEvent = "event1, event16=" + userAmount;
s.events = currencyEvent;
s.pageName = "Payment Complete";
s.eVar13=userAmount;
s.t();
06-08-2019 04:20 AM - edited 06-10-2019 10:08 PM
06-10-2019 07:18 AM
Hi @dragooonvj
By directly calling the s.t() or s.tl() methods you're breaking out of Tealium control and interacting directly with the AA code. While this can be useful, in most cases it just gets confusing.
It is probably better to manually call a utag.view() (for s.t) or utag.link (for s.tl) and then let the AA tag toolbox work out which events to fire.
So if you want to fire evar13, event1 and event16, set up mappings for that dimension and metrics in the AA tag, and then assign the appropriate data layer values and pass in to the utag.link call.
For example:
- create a data layer object called userAmount
- map userAmount to evar13 and event13 (as a value event) in the toolbox
- where ever it is you have your code calling s.t, replace that iwth something like:
utag.link( { link_name : "Fire Currency Event", userAmount :$('.ember-view.ember-text-field.form-control.amount').val() } );
That will then trigger the AA tag with a custom link name and the value for userAmount, which should then get mapped to your AA call.
Hope that helps
06-10-2019 10:14 PM
06-11-2019 02:31 AM
Copyright All Rights Reserved © 2008-2023