Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Complete URL not captured in g for SPA applications

Avatar

Avatar
Level 1
sharmilat804714
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
sharmilat804714
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
sharmilat804714
Level 1

12-05-2020

Could someone help me on capturing full url including the query parameters in case of “Single page application - SPA” in variable “g”, details as follows:

 

  1. Implementation done via Adobe Launch
  2. Implementation Method- EDDL

 

Issue Description: When I navigate from page A to page B(SPA), url changes from www.xyz.html to www.xyz.html/#pageB but the variable “g” in the adobe hit doesn’t capture the full url of the page B in page load call.

 

Impact: when I click on the CTAs on pageB, and If I break it down by url then it gives me incorrect results.

 

Alternatives Explored: Capturing page URL via Data Element Type: pageInfo and attribute: url and window.location.href. However, this is causing issues in the internal navigation clicks capturing the destination page url instead of current page due to timing issues.

g variable to capture url

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 2
Jayakrish
Level 2

Likes

6 likes

Total Posts

67 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
Jayakrish
Level 2

Likes

6 likes

Total Posts

67 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile
Jayakrish
Level 2

13-05-2020

Hi,

 

Can you check on the below approach once to get the full page URL. I see it is capturing for me.

 

Data Element --.Type (Custome Code) -->open editor then paste the code accordingly. 

 

var fullpageurl = window.location.href;

return fullpageurl;

 

Thank you,

Jay.