Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Could not send numeric values to Adobe via DTM

Avatar

Level 2

Im trying to send a numeric value to Adobe server, i tried with eVar, props, events but nothing works, after many searches came to know that events are best which supports the numbers but when i tried it, it is not sending the given value, will it consider only the instances? If so, please suggest me a way to send the numeric value

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Cool.

 

Could you try using the snippet below once and see what you get ? This should work if everything else is fine at your end. 

 

 

s.eVar1 = 'My Text';

s.eVar2 = 'My Text2';

s.events = 'event1=10.5';

s.linkTrackVars = 'eVar1,eVar2,events';

s.linkTrackEvents = 'event1';

s.tl(true, 'o','Fire event');

View solution in original post

27 Replies

Avatar

Community Advisor and Adobe Champion

I guess you should be on Adobe Launch instead of DTM, which is already sunset.

 

The first thing to capture numeric value is setting the success event as "Numeric" first instead of "Counter" in the Adobe Analytics Admin console for the report suite.

Screenshot 2023-11-21 at 1.50.05 PM.png

 

Then in Adobe Launch, you can assign value to an event in the Adobe Analytics' "Set Variables" action.

Screenshot 2023-11-21 at 1.52.32 PM.png

Avatar

Level 2

I'm using Adobe Analytics only, I don't see Adobe launch anywhere in the console, even the script which I load says adobedtm. 

Success event is also set as numeric 

Avatar

Community Advisor

Hi @karthik_22 

How are you sending the event ? Do you have a rule firing from Launch ?

Is yes, then as @leocwlau mentioned, you would need to ensure the event is mapped in the set variables action in the rule.

 

If you are using custom code, make sure you have the event set properly in s.events.

 

Regards,

Abhinav

Avatar

Level 2

Hi @abhinavbalooni 

i'm sending data from the client like this.

s.linkTrackVars = 'eVar1,eVar2';

s.linkTrackEvents = 'event1';
s.eVar1 = 'My Text';
s.eVar2 = 'My Text2';
s.event1 = 10.5; // Hardcoded as 10.5 for testing but this always carries numbers 
s.events = 'event1='+10.5; //.Tried this way as well, but no luck 

s.tl(true, 'o','Fire event');

the variables are already created in Adobe 

Avatar

Community Advisor

Hey @karthik_22 

 

You are missing events in linkTrackVars. That should be the reason you aren't getting numbers.

 

https://experienceleague.adobe.com/docs/analytics/implementation/vars/config-vars/linktrackvars.html...

 

Also, try using linktrackvars after you have initialised all the variables.

Avatar

Community Advisor and Adobe Champion

For the format of s.events, you may refer to events | Adobe Analytics, where basically something like 

s.events = "event1=4.5";

 

A sidetracked comment, check out Adobe Launch (aka Tags now) Tags Overview | Adobe Experience Platform. It is way better and easier to use a tag manager for tracking instead of doing JavaScript directly.

Avatar

Level 2

@abhinavbalooni  and @leocwlau I'm sending data in this format only but i couldn't see that in the dashboard, its been an hour, let me wait for few more time and I will also check the Tags now 

Avatar

Community Advisor

Hey @karthik_22 ,

 

Out of curiosity, you are getting data in eVars that are part of the request ?

Also, could you share a screenshot of the network request as well.

 

Regards,

Abhinav

Avatar

Level 2

@abhinavbalooni 

Yes! eVars & props are populating, only this event is not working, do we have to add anything in the data collection?

Apologies, i cannot share the screenshot of the request 

Avatar

Correct answer by
Community Advisor

Cool.

 

Could you try using the snippet below once and see what you get ? This should work if everything else is fine at your end. 

 

 

s.eVar1 = 'My Text';

s.eVar2 = 'My Text2';

s.events = 'event1=10.5';

s.linkTrackVars = 'eVar1,eVar2,events';

s.linkTrackEvents = 'event1';

s.tl(true, 'o','Fire event');

Avatar

Level 2
Yes @leocwlau correction is also done 

s.eVar1 = 'My Text';
s.eVar2 = 'My Text2';

s.events = 'event1='+10.5;
s.linkTrackVars = 'eVar1,eVar2, events';

s.linkTrackEvents = 'event1';
s.tl(true'o','Fire event');

Avatar

Community Advisor

Yeah, in your code the s.events = 'event1='+10.5; should be s.events='event1=10.5'; Correct that bit or else use the snippet I pasted above.

 

This will increment value of event1 every time it is fired.

Avatar

Level 2

Cool! this correction can be done but the value 10.5 is a dynamic one, for testing purpose I hardcoded it and so I gave as s.events= 'event1='+10.5;
let me change the value and see 

Avatar

Community Advisor

Even if you want to keep it dynamic, just feed the dynamic value in such a manner that the string format remains the same and it should work.

 

Cheers

Avatar

Level 2

Okay! I'm trying the same way as you suggested, i've sent the data to Adobe and waiting for it to reflect in the dashboard, hope it should work 

Avatar

Level 2

HI @abhinavbalooni 

Firstly thank you so much for spending time in helping me out.

Numeric type is not working but when I change it to counter and give a value without decimals it is working, since it is a counter it is accepting values and summing it up but not sure why numeric type is not working, need to check on this further

Avatar

Community Advisor

Hey @karthik_22 

Just a query, Are you using the same event to send both types of values?

 

I am pretty sure you already did this but you might want to change the type of the event to numeric for decimal values in the report suite settings.

 

Else, a cleaner soln, use two separate events, one for counter and one for numeric.

 

Cheers,

Abhinav

 

Avatar

Level 2

Hey @abhinavbalooni 

I used a separate event and declared its type to counter in report suite settings which was working but the other which had numeric was not working

Avatar

Community Advisor

That's weird. 

I will also try a small piece and get back some time today on what I see