Add to wishlist

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).

To the API reference

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

NameTypeRequiredDescription
INSTANCE_KEYURL-parameter - textyesYour Tweakwise Instance Key
PROFILE_KEYBody parameter - textyesThe ID that identifies the current visitor. Read more about the profile key here
SESSION_KEYBody parameter - textyesThe 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_IDBody parameter - textyesThe 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

⚠️No AddToWishlists received in the last 4 days

Description

No AddToWishlists events have been received in the last 4 days.

Possible solution

If your webshop includes wishlist functionality, verify that the event trigger on the 'add to wishlist' button is properly configured.

⚠️SessionKey: xx% missing / ProfileKey: xx% missing / ProductKey: xx% missing

Description

More than 0.5% of the AddToWishlists events are missing the SessionKey, ProfileKey, or ProductKey.

Possible solution

Ensure that all three keys are available from the frontend/data layer when an 'add to wishlist' action occurs.

⚠️Productkey: xx% not found

Description

More than 7% of the AddToWishlists events contain a ProductKey that does not exist in the Tweakwise catalog.

Possible solution

Check if the product IDs associated with wishlist buttons match the exact item IDs present in the the Tweakwise app.

⚠️Mismatched sessionkeys in this event and SessionStart (xx%)

Description

More than 5% of the AddToWishlists events have a mismatched or unknown SessionKey compared to SessionStart.

Possible solution

Verify that the SessionKey is maintained correctly during interactive actions like adding items to a wishlist.

Please share your findings with your implementation partner. If they have questions about these messages, please have them contact [email protected].