adobe / adobe/target-java-sdk

Server-side experiences not tracking with A4T

Offen
#7 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
23
Forks
24
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

There appears to be an issue with new users landing on the targeted page. The server-side implementation does not have an implementation for the Visitor API to get the ECID/MCID, thus causing a mismatch between Target and Analytics. Returning users with AMCV cookies already set do not appear to have an issue.

The example stats below are for a page that is mostly new users landing on it.

### Expected Behaviour
A4T accurately tracks user data from server-side requests. # of views in experiences should mimic the total # of views of the given page.

### Actual Behaviour
A4T is not attributing the appropriate experience for all views.

The following images were pulled from Analytics for the same time period. The page 'landing page:custom closets' is utilizing the server-side API and every user should be attributed an Experience. The total # of unique views should match between the two charts, as well as the # of submits (the conversion criteria).
![Target Experience Views](https://i.imgur.com/SaY4nwn.jpg)
![Total Unique Views](https://i.imgur.com/74aONDo.jpg)

### Reproduce Scenario (including but not limited to)

#### Steps to Reproduce
Implement the [target-java-sdk with analytics](https://github.com/adobe/target-java-sdk#ecid-and-analytics-integration).
Create a Target Experience. Track the # of views of the page compared to the views of the experiences.

#### Platform and Version
* target-java-sdk v1.1.0
* Spring v4.3.25.RELEASE

#### Sample Code that illustrates the problem
We followed the [sample provided for targetMcid](https://github.com/adobe/target-java-sdk-samples/blob/4619626b2e49f84cd2cd4ad570d96e5939b319e6/src/main/java/com/adobe/target/sample/controller/TargetController.java#L137).

The only difference being our integration through Launch. Visitor state is set to a JS variable which is propagated to the Visitor Service through Launch.

#### Logs taken while reproducing problem
##### New User Request
```JSON
{
"requestId": "1a6560bb-b963-44f5-8e59-802347f7f6d8",
"context": {
"channel": "web",
"address": {
"url": "https://www.containerstore.com/custom-closets"
},
"beacon": false
},
"experienceCloud": {
"analytics": {
"supplementalDataId": "02BC759D22D4FE7E-62749C19A3060DFA",
"logging": "server_side",
"trackingServer": "thecontainerstore.sc.omtrdc.net"
}
},
"execute": {
"pageLoad": {
"parameters": {},
"profileParameters": {}
},
"mboxes": []
},
"prefetch": {
"views": [
{
"parameters": {},
"profileParameters": {}
}
],
"mboxes": []
},
"notifications": []
}
```

##### Returning User Request
```JSON
{
"requestId": "2d05b638-d461-4377-904b-247b403032de",
"id": {
"tntId": "749afadd-3570-4efd-9e6a-84cd2c892160.35_0",
"marketingCloudVisitorId": "45913002719203183828537149552334816373"
},
"context": {
"channel": "web",
"address": {
"url": "https://www.containerstore.com/custom-closets"
},
"beacon": false
},
"experienceCloud": {
"analytics": {
"supplementalDataId": "697825C548C84264-1FC0EB4BDBB0355A",
"logging": "server_side",
"trackingServer": "thecontainerstore.sc.omtrdc.net"
}
},
"execute": {
"pageLoad": {
"parameters": {},
"profileParameters": {}
},
"mboxes": []
},
"prefetch": {
"views": [
{
"parameters": {},
"profileParameters": {}
}
],
"mboxes": []
},
"notifications": []
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem ECID- und Analytics-Integrationsleitfaden von target-java-sdk sowie mit dem Beispiel TargetController.java von target-java-sdk-samples um Zeile 137. Vergleiche die Anfragen für neue und wiederkehrende Benutzer und konzentriere dich dabei auf Visitor API-Identifikatoren und serverseitige Analytics-Daten. Als abgeschlossen gilt die Aufgabe, wenn serverseitige Anfragen für neue Benutzer die erwartete Target-Erfahrung zuordnen und die A4T-Aufrufe sowie die Übermittlungsanzahlen übereinstimmen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java, spring
Bereich
analytics, api, backend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.