Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Analytics API "Data Insertion Api"

Avatar

Level 2

I'm using Data Insertion Api  GET 
in the Documentation  the api is 
"https://smetrics.companyName.co.ec/b/ss/{rsid}/0/" 
they said that the zero is referred to indicates that the data submission requires JavaScript processing

https://namespace.sc.omtrdc.net/b/ss/fdfd/10/CODEVERSION?pe=tnt&tnta=4343&mcid=343243
--> this will return response like that ::

{"status":"SUCCESS","id":"318EF14475C63EE0-4000095F271D3FFC"}

is there is any one know what is this response ? 
 
https://namespace.sc.omtrdc.net/b/ss/fdfd/0/CODEVERSION?pe=tnt&tnta=4343&mcid=343243

and this  url with zero rather than 10 after the {{rsid}} will return no response the question is why ?

I didn't found any information about 10 after the {{rsid}} 
the other question is how long should i wait for see the result in adobe analytics .
and why that value not removed even after it the report received something there is no No Analytics link generated   ?

 

atef00_0-1662903086883.png


I have an issue that I don't know why if I call the data insertion api from the code I  mean locally not recognized in analytics 
but if i open a browser with a new window it will count why is that ...  how can i validate that my sequence is right ?

Thanks for your help in advance

 

3 Replies

Avatar

Community Advisor

@atef00 wrote:

https://namespace.sc.omtrdc.net/b/ss/fdfd/10/CODEVERSION?pe=tnt&tnta=4343&mcid=343243
--> this will return response like that ::

{"status":"SUCCESS","id":"318EF14475C63EE0-4000095F271D3FFC"}

is there is any one know what is this response ? 


I'm not sure why you're using "/10" instead of "/0" (or "/6", if you're sending a HTTP POST request). This is probably an incorrect request, so the response might not be sensible.

 


@atef00 wrote:

https://namespace.sc.omtrdc.net/b/ss/fdfd/0/CODEVERSION?pe=tnt&tnta=4343&mcid=343243

and this  url with zero rather than 10 after the {{rsid}} will return no response the question is why ?


It could be that you're sending an incorrect request. I noticed that you only have 3 parameters in your URL: "pe" and "tnta" and "mcid".

 


@atef00 wrote:

the other question is how long should i wait for see the result in adobe analytics .
and why that value not removed even after it the report received something there is no No Analytics link generated   ?

 

atef00_0-1662903086883.png


The data should show up in Adobe Analytics immediately. But I noticed that you're showing a screenshot from Adobe Target. Adobe Target is not the same as Adobe Analytics, even if you are using Adobe Analytics as the reporting source in Adobe Target. Double-check your Adobe Analytics itself to see if your test hits are being reported.

 


@atef00 wrote:


I have an issue that I don't know why if I call the data insertion api from the code I  mean locally not recognized in analytics 
but if i open a browser with a new window it will count why is that ...  how can i validate that my sequence is right ?


Double-check that your code is building the correct Data Insertion API request. Maybe you can output the request that is being sent, and then open that in your browser. Then you're ensuring that you're testing the correct API request.

Avatar

Level 2
this is sample from delivery-api documentation : as you can see there is only 3 required pe,tnta,mcid 
Sample A4T Data Insertion HTTP Get Call:

https://demo.sc.omtrdc.net/b/ss/myCustomRsid/0/MOBILE-1.0?pe=tnt&tnta=285408:0:0|2&mcid=2304820394812039

my api looks like this :: 

https://metrics.companyname.co.us/b/ss/myCustomRsid/0/CODEVERSION?pe=tnt&tnta=568037:1:0|0,568037:1:0|2,568037:1:0|1&mcid=66474943390664574931360982808332880046
that is what I'm calling in my code 
my tracking server is 
metrics.companyname.co.us
I don't know what is codeversion and what is the difference between it and MOBILE-1.0

in analytics documentation they said use 0 in GET expect no response so why 10 is returning response ? "I used it because I saw some websites using it"
noted that I'm not a website I use it for server and a mobile application 

atef00_0-1662972309871.png


the other question is how can I get my analytics in adobe analytics directly I don't understand if there is  a link generated and I clicked in the link will open that activity reports in adobe analytics 
but my question is why if I took that generated data-insertion-api that my code is calling and open that url in browser adobe target will listen to that request and increase hits so maybe I'm doing something wrong what are the factors that can affect hits ? 

Avatar

Community Advisor

It's quite difficult to understand your message. It looks like you're copying-pasting messages, so everything gets jumbled up and badly formatted. If someone else is passing you messages to post here, then maybe you can ask that person to write here directly instead.

Can you please provide the link to the developer documentation that you guys are referring to?

Avatar

Level 2

I'm sorry that you received that feeling that we are copying and pasting we are not ... and we appreciate your help in our issue
first of all  this is a  delivery api  that we are using and we are trying to implement Adobe Analytics for Target from server side.

let me raise the issue again. we are trying to call the data insertion api and replace all place holders like the value of rsid and the value of mcid and the value of tnta "with appropriate values"

but when we call it and see in our logs that everything is running correctly with success and 200 status code 

but there is no thing happened in adobe analytics "our report metrics is not  changing"

I tried to take the request of data insertion api alone with the appropriate values from the logs  see the request above .... after maybe 30 mins the report metrics changed and unique visitors increased by one . I wonder why this is happening ?

Thanks dor your reply and your help

Avatar

Community Advisor

@atef00 wrote:

I'm sorry that you received that feeling that we are copying and pasting we are not ... and we appreciate your help in our issue


Thanks for resending your message! 😀 I appreciate it very much and I think I have a better understanding of your problem. Also, thanks for the link to that Adobe Target developer doc, that was an important piece of information that was missing. 👍

If I understand your work so far, you have managed to call the Adobe Target Delivery API to retrieve the Analytics payload. And now, you are using that payload to use with Adobe Analytics Data Insertion API.

 


@atef00 wrote:

first of all  this is a  delivery api  that we are using and we are trying to implement Adobe Analytics for Target from server side.

let me raise the issue again. we are trying to call the data insertion api and replace all place holders like the value of rsid and the value of mcid and the value of tnta "with appropriate values"

but when we call it and see in our logs that everything is running correctly with success and 200 status code 


Firstly, in that Adobe Target developer doc, it's stated that the "/0" should be used. So I don't know why you're using "/10". It might be a mistake.

Secondly, I noticed that the Data Insertion URL used in the Adobe Target developer doc includes "CODEVERSION", whereas the Data Insertion API doc itself does not. (Reference: https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/data-insertion-api/sample_code/r_sa...) In a normal Adobe Analytics hit (e.g. from a website), CODEVERSION refers to the version of the AppMeasurement.js tracking file that is being used. This has a specific format. But it looks like the Data Insertion API doesn't require this. So I suggest that you remove "CODEVERSION" from your URL. I.e. instead of 

https://metrics.companyname.co.us/b/ss/myCustomRsid/0/CODEVERSION?pe=tnt&tnta=568037:1:0|0,568037:1:...

use

https://metrics.companyname.co.us/b/ss/myCustomRsid/0?pe=tnt&tnta=568037:1:0|0,568037:1:0|2,568037:1...

I believe you have populated the "pe", "tnta" and "mcid" parameters properly, so those should be good.

 


@atef00 wrote:

but there is no thing happened in adobe analytics "our report metrics is not  changing"

I tried to take the request of data insertion api alone with the appropriate values from the logs  see the request above .... after maybe 30 mins the report metrics changed and unique visitors increased by one . I wonder why this is happening ?

Thanks dor your reply and your help


Try making the 2 changes that I had mentioned above:

  1. Use "/0" instead of "/10"
  2. Remove "/CODEVERSION"

Then send your Data Insertion API request again. Then, do the following to check your data:

  1. Wait about 24 hours.
  2. From your Adobe Target experiment, go to its Report, then click the "View in Analytics" link to open the report in Analytics. A new browser tab with the Analytics report should open.
  3. In that Analytics report, check if the number of Unique Visitors has increased. You can change the report's date range to the date when you had sent your Data Insertion API request, to narrow down the data.

The reason for waiting 24 hours is that there is a delay between when data is processed by Target and Analytics. See the "Note" box at https://experienceleague.adobe.com/docs/target/using/integrate/a4t/reporting.html?lang=en.

Hope all of that helps you in troubleshooting this problem.

Avatar

Level 2

how can I double check that ? 
what should i open in adobe analytics is there any pre request to do before hitting and counting the results.
 

atef00_1-1662972978550.png

 

atef00_2-1662973161229.png

 

Avatar

Community Advisor

Is there anybody at your company who is familiar with Adobe Analytics? It might be easier for you to work with that person to run report(s) and see if your data has been collected properly.