Visual Studio Code / Axios - API 1.4 Data Insertion - No data shown on Adobe Analytics workspaces/Reports | Community
Skip to main content
June 12, 2022
Solved

Visual Studio Code / Axios - API 1.4 Data Insertion - No data shown on Adobe Analytics workspaces/Reports

  • June 12, 2022
  • 1 reply
  • 1524 views

Dear Community,

 

We would like to use the API1.4 Data Insertion from a Visual Studio Code extension. Unfortunately, data sent by VsCode get a successful response, but it will not show up in the Adobe Analytics Workspaces/reports. Sending the XML from postman client works just fine.

Are we missing any headers?

Any help is very appreciated.

 

It does not matter if http / https

- dataInsertionEndpoint / URL: http://namespace.d3.sc.omtrdc.net/b/ss//6

XML Data:

 

 

<?xml version='1.0' encoding='UTF-8'?> <request> <sc_xml_ver>1.0</sc_xml_ver> <pageName>VsCode</pageName> <reportSuiteID>[rid]</reportSuiteID> <server>code</server> <visitorID>c25930888980c1c1ad78d8ccfbbacdc760bf8cc7e1fc182dae10b3815c78504c</visitorID> <IPaddress>192.168.0.1</IPaddress> <eVar101>AppV1</eVar101> <eVar102>corev2</eVar102> <eVar103>plugin_start</eVar103> <eVar104>1.1.2</eVar104> <eVar105>c25930888980c1c1ad78d8ccfbbacdc760bf8cc7e1fc182dae10b3815c78504c</eVar105> <eVar106>2022-06-12T10:35:05.606Z</eVar106> </request>

 

The SUCCESS response:

 

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

 

 

VS Code AXIOS:

 

sendXml(requestXml) { return __awaiter(this, void 0, void 0, function* () { this.logger.info(`Would send request to ${this.dataInsertionEndpoint}`, { requestXml }); const response = yield axios_1.default.post(this.dataInsertionEndpoint, requestXml, { headers: { 'Content-Type': 'application/xml' } }); this.logger.info(`Sent request to ${this.dataInsertionEndpoint}`, { response: response.data }); } }); }

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Alexis_Cazes_

Check what type of timestamp enabled settings is your report suite. https://experienceleague.adobe.com/docs/analytics/admin/admin-tools/timestamp-optional.html?lang=en

 

Timestamp optional support both server calls with and without manual timstamp where timestamp disabled does not support manual timestamp and timestamp enabled only support manual timestamp.

 

Is your report suite located in London data center as d3 points to London. If report suite where created recently d3 is not needed.

 

Also ipadddress is wrong it should be <ipaddress></ipaddress>

 

sc_xml_ver also need to be scXmlVer

 

I would advise you to extract raw data using data feed for the data and validate the that exclude_hit is correct for the hits you sent if received:

exclude_hitFlag indicating that the hit is excluded from reporting. The visit_num column is not incremented for excluded hits.
1: Not used. Part of a scrapped feature.
2: Not used. Part of a scrapped feature.
3: No longer used. User agent exclusion
4: Exclusion based on IP address
5: Vital hit info missing, such as page_url, pagename, page_event, or event_list
6: JavaScript did not correctly process hit
7: Account-specific exclusion, such as in a VISTA rules
8: Not used. Alternate account-specific exclusion.
9: Not used. Part of a scrapped feature.
10: Invalid currency code
11: Hit missing a timestamp on a timestamp-only report suite, or a hit contained a timestamp on a non-timestamp report suite
12: Not used. Part of a scrapped feature.
13: Not used. Part of a scrapped feature.
14: Target hit that did not match up with an Analytics hit
15: Not currently used.
16: Advertising Cloud hit that did not match up to an Analytics hit
tinyint unsigned

1 reply

Alexis_Cazes_
Alexis_Cazes_Accepted solution
Level 10
June 13, 2022

Check what type of timestamp enabled settings is your report suite. https://experienceleague.adobe.com/docs/analytics/admin/admin-tools/timestamp-optional.html?lang=en

 

Timestamp optional support both server calls with and without manual timstamp where timestamp disabled does not support manual timestamp and timestamp enabled only support manual timestamp.

 

Is your report suite located in London data center as d3 points to London. If report suite where created recently d3 is not needed.

 

Also ipadddress is wrong it should be <ipaddress></ipaddress>

 

sc_xml_ver also need to be scXmlVer

 

I would advise you to extract raw data using data feed for the data and validate the that exclude_hit is correct for the hits you sent if received:

exclude_hitFlag indicating that the hit is excluded from reporting. The visit_num column is not incremented for excluded hits.
1: Not used. Part of a scrapped feature.
2: Not used. Part of a scrapped feature.
3: No longer used. User agent exclusion
4: Exclusion based on IP address
5: Vital hit info missing, such as page_url, pagename, page_event, or event_list
6: JavaScript did not correctly process hit
7: Account-specific exclusion, such as in a VISTA rules
8: Not used. Alternate account-specific exclusion.
9: Not used. Part of a scrapped feature.
10: Invalid currency code
11: Hit missing a timestamp on a timestamp-only report suite, or a hit contained a timestamp on a non-timestamp report suite
12: Not used. Part of a scrapped feature.
13: Not used. Part of a scrapped feature.
14: Target hit that did not match up with an Analytics hit
15: Not currently used.
16: Advertising Cloud hit that did not match up to an Analytics hit
tinyint unsigned
Alexis_Cazes_
Level 10
June 13, 2022

acutally the documentation and example differ for some of the tags:

<sc_xml_ver>1.0</sc_xml_ver>

and

<ipAddress>192.168.10.1</ipAddress>

 Also I believe when I tested in the path the API you might want to send a correct userAgent as it might default to one that is considered as a BOT.