Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

Web SDK - do you use any specific Event Type for first event of the session

Avatar

Level 10
In order to track traffic source and utms?
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 5

To track the first event of a session using Adobe Web SDK, you can use context data (e.g., isFirstEvent: true) or rely on server-side sessionization logic. Traffic sources and UTM parameters can be captured automatically through referrer data or sent explicitly by extracting them from the URL and including them in the event payload.

You can also define custom fields in your XDM schema for better organization and tracking of these parameters.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 5

To track the first event of a session using Adobe Web SDK, you can use context data (e.g., isFirstEvent: true) or rely on server-side sessionization logic. Traffic sources and UTM parameters can be captured automatically through referrer data or sent explicitly by extracting them from the URL and including them in the event payload.

You can also define custom fields in your XDM schema for better organization and tracking of these parameters.

Avatar

Level 4

Hi @Michael_Soprano  

 

Yes, thats possible. you have many option to define during the implementation. 

 

Ideally on a first page load will be a better option to do so.

 

Find the implementation approaches,

 

To track the first event of a session using Adobe Experience Platform Web SDK, you need to leverage the onInstanceCreated event listener and potentially the sendEvent command. The onInstanceCreated event triggers when a new Web SDK instance is successfully created, indicating a new session. You can then use sendEvent to send an event to Adobe, which can be configured to track various actions, including a page view or a custom event.


Here's a more detailed breakdown:


1. Configure the Web SDK:
Ensure the Web SDK is properly installed and configured within your Adobe Launch property.
2. Create a Rule:
Create a new rule in Adobe Launch with the trigger "Web SDK: On Instance Created".
3. Add an Action:
Add an action to this rule that uses the "Send Event" command. This will send data to the Adobe Experience Platform Edge Network.
4. Define the Event:
Configure the "Send Event" action to specify the event type (e.g., "page view" or a custom event) and any associated data you want to track. For example, you might want to track the first page view of a session or a specific user interaction.
5. Map Data (Optional):
If you are sending data to Adobe Analytics or other solutions, you may need to map the data from the Web SDK to the appropriate fields in those solutions.
6. Publish:
Save and publish your changes to your Launch property.


Example (Conceptual):


Let's say you want to track the first page view of a session:
In your Launch rule, trigger on "Web SDK: On Instance Created".
Add an action to "Send Event".
Set the event type to "page view".
Optionally, map the page name and page view value to the XDM object.
Publish the changes.


This setup will send a page view event to Adobe whenever a new Web SDK instance is created, effectively tracking the first page view of a session

Avatar

Administrator

@Michael_Soprano Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni