> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invoca.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Invoca for Tealium Integration Setup Guide

> Tealium is a bidirectional integration: manage your Invoca Tag through Tealium iQ, send Invoca data to Tealium, and expose Tealium audience data back to the Invoca Tag.

Tealium is a universal data hub that unifies customer data otherwise siloed between teams and tools. The Invoca and Tealium integration is bidirectional — here's what each direction lets you do:

* Manage your Invoca Tags through Tealium iQ, with changes in either system automatically reflected in both, and the firing rules of both systems available to you.
* Send Invoca data to Tealium for use in EventStream and AudienceStream, consolidating customer data from across your apps in one place.
* Expose AudienceStream visitor profile data to the Invoca Tag, so Invoca can associate audience data with a call — helping optimize call routing and caller experience.

This guide covers installing and configuring each data flow. You can implement one or all of them, depending on your Tealium products and use cases.

## Section 1: Manage your Invoca Tag using Tealium iQ

This integration is only available for network-level Invoca accounts.

1. Log in to your Tealium account and follow Tealium's guide to adding a new tag.
2. In the Vendor Name search bar, search for "Invoca," then find and add the InvocaJS Web Integration tag.
   * If you have more than one Invoca Tag, you can add each one to Tealium — just rename each tag in Tealium to keep them straight.
3. Log in to your Invoca account and click the gear icon in the top-right corner.
4. Select **Invoca Tags**.
   * If you have more than one Invoca Tag, use the dropdown to select the one you want to add to Tealium.
5. Scroll to the Code Snippets tile and copy your 4-digit network ID and unique Tag ID.
6. Return to Tealium and paste your network ID and Tag ID into the configuration page to finish setting up the tag.
7. Follow Tealium's documentation to select the environments to deploy the Invoca Tag to, and apply any load rules you want. We recommend executing on all pages.

Your Invoca Tag is now implemented on the enabled environments and ready for testing. Going forward, any tag rules set in Tealium also apply to the Invoca Tag.

## Section 2: Send Invoca data to your Tealium account

**Step 1: Create a Data Source for Invoca in Tealium**

1. Log in to Tealium and follow Tealium's guide to adding a new Data Source.
2. Under Developer Languages, select the HTTP API Data Source, and name it "Invoca Post-Call Webhook."
3. Skip the Event Specifications step and continue to the Get Code page. Copy the Account, Profile, and Data Source Key shown there into a separate document — you'll need these shortly. Save and publish your new AudienceStream profile.

**Step 2: Configure the Tealium integration tile in Invoca**

<Note>
  **Note**

  The required Marketing Data Field "Tealium Visitor ID" is automatically created during Action setup and shouldn't be created manually.
</Note>

1. In the Invoca sidebar menu, click **Integrations**, then **Manage Integrations**.
2. Click the Tealium tile. If it says "Learn More" instead, talk with your Customer Success Manager or account manager about enabling access.
3. Enter a friendly name to identify your Tealium account.
4. Enter the Tealium Account Name, Profile, and Data Source Key from Step 1.

**Creating an Action**

1. Enter a friendly name for the Action — including "Call" or the Signal name helps distinguish between Actions.
2. Optionally filter which calls/Signals to send by choosing a Profile (Network level) or Campaign (Profile/Advertiser level).
3. Use the "Triggered By" dropdown to choose the transaction type to send as an event — select All Calls to report calls, or Signal and a specific Signal to report a Signal. Create separate Actions for multiple transaction types. (Note: the "Paid Calls" type refers to affiliate/publisher calls that qualify for a commission.)
4. Enter a Tealium Event Name, sent in the `tealium_event` attribute to identify the event type — this can be a custom or marketplace event name. Once data is flowing, you can define an Event Specification in Tealium for custom events.
5. Under Additional Parameters, optionally send extra Invoca data to Tealium as attributes — the name is usually hardcoded text matching an attribute you'll define in Tealium; the value can be hardcoded or an Invoca substitution token.
6. Click **Save** to complete the Action. Repeat these steps for each transaction type you want to report as a Tealium Event.

To create another Action, click **+ New Action** and choose an existing environment — you'd only create an Action under a new Tealium account if you're integrating multiple Tealium accounts.

**Step 3: Capture the Tealium Visitor ID**

This sets up your Invoca Tag to capture the Tealium Visitor ID — an identifier Tealium assigns to website visitors — so Tealium can associate a call event with the right profile.

1. Click the gear icon, select **Invoca Tags**, and find the Tag implemented on your website.
2. Open the Revision History tab and create a New Draft, or continue editing an existing one. (Use the New Draft button, not New Tag.)
3. In the Notes field, enter "Adding Tealium visitor ID."
4. On the edit Tag page, find the Tealium Visitor ID parameter in the Marketing Data section.
5. Select DataLayer as the Data Source Type and make sure it's enabled.
6. For the Data Source Name, enter `utag.data.tealium_visitor_id`.
7. Test your changes to confirm everything works.
8. Click **Save & Go Live**.

If the Invoca Tag consistently runs before the Tealium script sets the identifier, use the "Re-run attribution" setting in the Invoca Tag. Start around 5 seconds and adjust based on how many tags load on your site. If you have multiple Invoca Tags, publish updates to each.

Your account is now set up to send call data to Tealium, adding Invoca call and conversion data to your visitor profiles across your marketing apps.

## Section 3: Utilize Tealium AudienceStream data in Invoca

Next, set up Tealium to send visitor profile data back to Invoca, so you can use it for real-time call routing and caller experience — by injecting data into your landing page's JavaScript data layer, where the Invoca Tag can pick it up.

**Before you begin:** You must complete Section 1 before this section.

1. In Tealium iQ, navigate to your Invoca Tag, then follow Tealium's guide to creating a new Custom Data Mapping for each parameter you want to send to Invoca. You can send as many variables as you have custom Marketing Data fields available.
2. Name the Destination of each Data Mapping to match its variable (for example, "invoca\_leadscore"). Write down your destination names — you'll need them shortly.
3. In Invoca, create a custom Marketing Data field for each data mapping, using:
   * Field type: Short Text
   * Partner (API) Name: matching your Step 1 variable (for example, "tealium\_leadscore")
   * Friendly Name: the same, in readable form (for example, "Tealium Lead Score")
   * Attribution: Last
4. Click the gear icon, select **Invoca Tags**, and edit the tag(s) you want to use with the integration.
5. In the Marketing Data section of the Tag Wizard, find your new fields and enable the Enabled slider for each.
6. For each field, set:
   * Data Source Type: JavaScript Data Layer
   * Data Source Name: `localStorage.getItem("DESTINATION NAME")`, replacing "DESTINATION NAME" with the destination you chose in step 2.
7. Save and test your Tag revision, then click **Go Live**.

Your Invoca Tag now captures Tealium data into the Marketing Data fields you created. Use those fields in a Real-Time Routing Webhook, to build new Signals, or in your other Invoca integrations.

## Section 4: Validate your integration using Tealium Live Events

You can view a record of your Invoca Tag firing and the data it transfers using Tealium's Live Events — useful for validating and troubleshooting the integration, and for creating new Event Specifications from Invoca event data.

**Before you begin:** You must complete Section 2 before this section.

1. In Tealium, return to your data sources menu, scroll to the Invoca Post-Call Webhook data source, and click **View in Live Events**.
2. Find and select an event sent by an Invoca webhook to see all the data sent to Tealium from one call.
3. Create an Event Specification for each Invoca event. We recommend unchecking "Required" for all attributes.

## Appendix: Example webhook payload

```json theme={null}
{
 "tealium_account": "{Your Tealium Account Name}",
 "tealium_profile": "{Your Tealium Profile}",
 "tealium_datasource": "{Data Source Key}",
 "tealium_event": "{Event Name}",
 "tealium_visitor_id": "<tealium_vid>",
 "connect_duration": "<connect_duration>",
 "call_start_time_utc": "<start_time_utc>",
 "utm_source": "<utm_source>",
 "utm_medium": "<utm_medium>",
 "utm_campaign": "<utm_campaign>",
 "utm_content": "<utm_content>",
 "calling_page": "<calling_page>"
}
```
