File tree 14 files changed +26
-18
lines changed
advanced-atjs-integration-serverstate
ecid-analytics-atjs-integration
ecid-analytics-integration
ecid-customer-ids-integration
multiple-mbox-ecid-analytics-atjs-integration
next-server-side-rendering-demo
shared-ecid-analytics-integration
14 files changed +26
-18
lines changed Original file line number Diff line number Diff line change 26
26
"author" : " Adobe Systems Inc." ,
27
27
"license" : " Apache-2.0" ,
28
28
"dependencies" : {
29
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
29
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
30
30
"cookie-parser" : " ^1.4.4" ,
31
31
"express" : " ^4.17.1"
32
32
}
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1"
31
31
}
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1"
31
31
}
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1"
31
31
}
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1"
31
31
}
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " alpha " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2.1.0 " ,
29
29
"cookie-parser" : " ^1.4.5" ,
30
30
"express" : " ^4.17.1" ,
31
31
"handlebars" : " ^4.7.4" ,
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1"
31
31
}
Original file line number Diff line number Diff line change @@ -26,14 +26,21 @@ function getTargetOptions(ctx) {
26
26
} ;
27
27
}
28
28
29
- function setTraceToken ( trace = { } , ctx ) {
29
+ function setTraceToken ( request = { } , ctx ) {
30
+ const { trace= { } } = request ;
30
31
const { authorizationToken = ctx . query . authorization } = trace ;
31
32
32
33
if ( ! authorizationToken || typeof authorizationToken !== "string" ) {
33
- return trace ;
34
+ return request ;
34
35
}
35
36
36
- return Object . assign ( { } , trace , { authorizationToken } ) ;
37
+ return {
38
+ ...request ,
39
+ trace : {
40
+ ...trace ,
41
+ authorizationToken
42
+ }
43
+ }
37
44
}
38
45
39
46
function setResponseCookies ( ctx , response ) {
@@ -47,12 +54,13 @@ async function prefetchOffers(ctx) {
47
54
return { } ;
48
55
}
49
56
const requestURL = ctx . req . headers . host + ctx . asPath ;
50
- const prefetchViewsRequest = {
57
+ let prefetchViewsRequest = {
51
58
prefetch : {
52
59
views : [ { address : { url : requestURL } } ]
53
60
}
54
61
} ;
55
- prefetchViewsRequest . trace = setTraceToken ( prefetchViewsRequest . trace , ctx ) ;
62
+
63
+ prefetchViewsRequest = setTraceToken ( prefetchViewsRequest , ctx ) ;
56
64
57
65
const options = Object . assign (
58
66
{ request : prefetchViewsRequest } ,
Original file line number Diff line number Diff line change 20
20
"@adobe/target-nodejs-sdk" : false
21
21
},
22
22
"dependencies" : {
23
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
23
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
24
24
"isomorphic-unfetch" : " ^3.0.0" ,
25
25
"next" : " ^9.0.0" ,
26
26
"nookies" : " ^2.0.8" ,
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " alpha " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2.1.0 " ,
29
29
"cookie-parser" : " ^1.4.5" ,
30
30
"express" : " ^4.17.1" ,
31
31
"handlebars" : " ^4.7.4" ,
Original file line number Diff line number Diff line change 15
15
"author" : " Adobe Systems Inc." ,
16
16
"license" : " Apache-2.0" ,
17
17
"dependencies" : {
18
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
18
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
19
19
"axios" : " ^0.19.0" ,
20
20
"cookie-parser" : " ^1.4.4" ,
21
21
"express" : " ^4.16.4" ,
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1" ,
31
31
"uuid" : " ^3.3.3"
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1"
31
31
},
Original file line number Diff line number Diff line change 25
25
"author" : " Adobe Systems Inc." ,
26
26
"license" : " Apache-2.0" ,
27
27
"dependencies" : {
28
- "@adobe/target-nodejs-sdk" : " ^1.0.3 " ,
28
+ "@adobe/target-nodejs-sdk" : " ^2. 1.0" ,
29
29
"cookie-parser" : " ^1.4.4" ,
30
30
"express" : " ^4.17.1"
31
31
}
You can’t perform that action at this time.
0 commit comments