Web SDK - do you use any specific Event Type for first event of the session | Community
Skip to main content
Michael_Soprano
Level 10
June 24, 2025
Solved

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

  • June 24, 2025
  • 3 replies
  • 416 views
In order to track traffic source and utms?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by KumarRishii

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.

3 replies

KumarRishii
KumarRishiiAccepted solution
Level 5
June 25, 2025

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.

Imbalakumar
New Member
June 25, 2025

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

Balakumar Saravanavel
kautuk_sahni
Community Manager
Community Manager
June 30, 2025

@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