Expand my Community achievements bar.

SOLVED

Using ContextData with DataInsertion Api not working

Avatar

Level 5

I am using the insertion api and also context data as follows:

<ABC>page</ABC>

And I am using a processing rule like this: overwritevalue of evar5  with abc(contextData)

Looking at my data I see no values coming though the reports but I see that a specific event which is included within the servercall gets triggered but not the context data. Does anyone know why? this is pretty urgent!

I hope someone can support me!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

The request needs to look as follow:

<request>

  <sc_xml_ver>1.0</sc_xml_ver>

  <pageUrl>Need to provide an url even if it is a fake one</pageUrl>

  <pageName>Need to provide a page name</pageName>

  <reportSuiteID>reportsuiteid</reportSuiteID>

  <visitorID>Unique visitorID</visitorID>

  <contextData>

       <abc>bla</abc>

  </contextData>

</request>

Make sure you the following answer:

<?xml version="1.0" encoding="UTF-8"?> <status>SUCCESS</status> 

Make sure that the report suite timestamp configuration is correct, if you send the timestamp tag then it needs to be either timestamp enabled or timestamp optional.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

The request needs to look as follow:

<request>

  <sc_xml_ver>1.0</sc_xml_ver>

  <pageUrl>Need to provide an url even if it is a fake one</pageUrl>

  <pageName>Need to provide a page name</pageName>

  <reportSuiteID>reportsuiteid</reportSuiteID>

  <visitorID>Unique visitorID</visitorID>

  <contextData>

       <abc>bla</abc>

  </contextData>

</request>

Make sure you the following answer:

<?xml version="1.0" encoding="UTF-8"?> <status>SUCCESS</status> 

Make sure that the report suite timestamp configuration is correct, if you send the timestamp tag then it needs to be either timestamp enabled or timestamp optional.

Avatar

Level 5

Thanks for your help. Is there a possibility to test such request in the console of chrome or another way? So that I will be able to see the request before it is being tracked!

The report suite is timestamp enabled.

Avatar

Community Advisor

You can use curl command to send the request:

I wrote the following some time ago: Data Insertion API for Adobe Analytics. · alcazes/Adobe-Analytics-from-A-To-Z Wiki · GitHub

Even if the request returns SUCCESS, it does not mean that it will be processed successfully. Some things to be aware of:

  • Always specify a valid User-Agent. never use the default one of CURL
  • Always specify a pageName and pageURL even if they are dummy ones.
  • Checkthe timestamp settings of report suite. In Adobe Analytics go to Admin >> Report suites >> Select report suite >> Edit Settings >> General >> Timestamp Configuration
    • If you have report suite configured to timestamp enabled you need to send the timestamp tag in the request <timestamp>1523579600000</timestamp>
    • If you have report suite configured to timestamp disabled then you should NEVER send the timestamp tag
    • If you have report suite configured to timestamp optional then the timestamp tag is optional. Adobe Analytics will add a server side timestamp to the server call when it receives it if no custom timestamp is send
  • Visitor ID need to be present, one of the visitor tag needs to be present.

I usually use the realtime reports in Adobe Analytics to check that I receive the server call. I usually configure the real-time report to look at page name.

One more important thing: you should create processing rules to process the contextData. In my post above I only have tag <abc> in <contextData> so processing rule should put abc to lets say an eVar report.