In Page view call need to add additional events (page load time, time spent on previous page) from data-layer | Community
Skip to main content
Level 2
May 21, 2024 7:58 PM UTC
Solved

In Page view call need to add additional events (page load time, time spent on previous page) from data-layer

Hi,

 

I am new with the web-sdk implementation, need help with one specific scenario.

 

In page view call i want to append additional events like page-load time, time-spent on previous page (developer have passed the values in datalayer). Like this - web.webPageDetails.pageLoadTime and web.webPageDetails.timeSpentOnPreviousPage.

 

Created the corresponding data elements and using those data-elements in XDM object. By assigning in _experience.analytics.events1to100.event31.value to corresponding data-element. Is that approach right ? Because i am not seeing any data getting populated into reports.

 

While i can see data flowing in interact call. 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
bjoern__koth
bjoern__kothAccepted solution
New Participant
May 22, 2024 7:06 AM UTC

Hi @parth_gupta 

in your data element, you are trying to assign an object to the actual value of the event.

 

looking at your data layer screenshot, you are also having a value property in there. 

 

try this instead 

 

web.webPageDetails.pageLoadTime.value

 

 

 

 

 

you should be able to verify this by executing this in your console 

 

adobeDataLayer.getState("web.webPageDetails.pageLoadTime")

 

respectively

 

adobeDataLayer.getState("web.webPageDetails.pageLoadTime.value")


hope that helps.

 

Björn

Cheers from Switzerland!

8 replies

bjoern__koth
New Participant
May 22, 2024 5:42 AM UTC

Hi @parth_gupta 

your approach should be correct. Can you shed a little light on when and where you set custom events? I.e., through custom code or mapping directly in the WebSDK actions?

 

Have you tried setting a dummy event to value 1 where you set the page relevant data in the XDM? Does that show?


cheers

Björn

Translate
Cheers from Switzerland!
Level 2
May 22, 2024 6:16 AM UTC

Hi Bjorn,

 

Yes i tried sending dummy values as well - like random numbers. That data is coming up in the reports.

 

Page Load time data element -

 

XDM is set up like this -

 

 

My Rule is like this -

 

Thanks,

Parth

 

 

Translate
abhinavbalooni
New Participant
May 22, 2024 6:32 AM UTC

Hey @parth_gupta 

 

Are the events enabled in the reporting suite to collect data ?

 

Cheers,

Abhinav

Translate