Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

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 });
                 }
        });
    }

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Community Advisor

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. 

 

 

Avatar

Level 1

It looks like the UserAgent did the trick.

 

Thank you.