This event marks adding a product to the wishlist
Using the Tweakwise JS implementation?This event is automatically included when you're using a button with the 'twn.add-to-favorites' event on the Tweakwise product tiles.
In all other scenarios, you'll have to implement it manually (i.e., product detail page).
How to implement?
// INSTANCE_KEY, SESSION_KEY, and PROFILE_KEY are inherited from the base tag.
tweakwiseLayer.push({
event: 'addtowishlist',
data: {
productKey: 'ITEM_ID'
}
});curl --request POST \
--url 'https://navigator-analytics.tweakwise.com/api/addtowishlist?instanceKey=INSTANCE_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"ProfileKey": "PROFILE_KEY",
"SessionKey": "SESSION_KEY",
"ProductKey": "ITEM_ID"
}
'Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| INSTANCE_KEY | URL-parameter - text | yes | Your Tweakwise Instance Key |
| PROFILE_KEY | Body parameter - text | yes | The ID that identifies the current visitor. Read more about the profile key here |
SESSION_KEY | Body parameter - text | yes | The session key for the specific user. This can be your own session key or GA session, as long as it's consistent throughout the user's session. Allowed characters: alphanumeric and hyphens |
ITEM_ID | Body parameter - text | yes | The Tweakwise item ID of the product that is added to the wishlist |
When do I submit this event?
Submit this event when adding a product to the wishlist or marking it as a favorite.
Where do I implement this event in the code?
On every page where you can add a product to the wishlist or mark it as a favorite, for example:
- Category page
- Search result page
- Product detail page
- Page with recommendations
- Page with guided selling
How to handle event-specific warnings from Tweakwise
SessionKey: xx% missing / ProfileKey: xx% missing / ProductKey: xx% missing
Mismatched sessionkeys in this event and SessionStart (xx%)
Please share your findings with your implementation partner. If they have questions about these messages, please have them contact [email protected].
