Back

This article will guide you on how to send audience data to Krux using their Mobile HTTP API via an AudienceStream Webhook Connector.

Before you begin, this article assumes your familiarity with the Webhook action, "Send Custom Request".

Table of Contents Placeholder

Overview

This solution combines the following components from iQ and Customer Data Hub:

  • Krux tag in iQ
  • Persist Data Value extension in iQ
  • Visitor Attribute in Customer Data Hub
  • Webhook in Customer Data Hub

iQ Tag Management

Add the Krux Control Tag

Add the Krux Control tag from the iQ Tag Management Tag Marketplace. Configure the tag with the Krux Configuration ID provided to you by Krux. 

kruxtag.png

Set Cookie with Krux User ID

In order to match the user you are sending via the Webhook connector to a Krux user, you need to extract the Krux User ID from the Krux object populated by the Krux Control Tag. The Krux object's naming convention will vary per client. The code to extract the user ID will be similar to Krux.ns.CLIENT('get', 'user'), where CLIENT is your specific Krux client name. You can either ask your Krux representative for the naming convention of this object or examine the object in Chrome DevTools Console by typing Krux.ns and examining the resulting object. 

Once you obtain your Krux client name, follow these steps to save the Krux User ID to a cookie:

  1. Add two variables in Tealium iQ Tag Management Data Layer.
  2. Add a Set Data Values Extension to extract the Krux object User ID into krux_id. Set the Execution of this extension to "After Tags". This gives the Krux Control Tag a chance to create the Krux object.

    Set the conditions for this extension to only set the variable if the utag_main_krux_id cookie has not yet been set.


    Krux set data values

  3. Add a Persist Data Value Extension to store the krux_id from the extension above in a cookie.

    Set the conditions to only store this cookie if the krux_id variable is populated and keep the first value set.

krux persist

Customer Data Hub

Set Visitor Attribute with Krux User ID

Create a Visitor-scoped String Attribute named "Krux ID". Populate this attribute from the utag_main_krux_id cookie.

krux id attribute.png

Add Krux HTTP API Webhook

This section will define the parameters needed to create the Krux connector using the Webhook Send Custom Request Action.

Vendor documentation: Krux Mobile HTTP API 

  • Method: GET
  • URLhttps://beacon.krxd.net/pixel.gif&tech_browser_lang=en
  • URL Parameters:
    Mapped Attribute Krux Parameter Description
    <Custom Value> _kpid Publisher UUID (provided by Krux)
    <Custom Value> _kcp_d Domain (provided by Krux)
    <Custom Value> _kcp_s Site (provided by Krux)
    Krux ID _kuid Krux ID Visitor Attribute
    <Custom Value> _kua_<krux_user attribute_name>

    Custom user attribute set in Krux

    (e.g. _kua_cartAbandoner)

connector.png