Setting up Tealium IQ on a Salesforce Community website

Silver Contributor
Silver Contributor

Has anyone been able to successfully setup Tealium IQ in a Salesforce Communitiy website? We've tried several methods of implementation and keep running into issues. Thanks in advance for any and all help.

Here is what our developer has done so far:

There are 2 places I thought of to put code that would run when each page loads in the community.  Once is in the Head Markup, which is set within the builder.  The other is on the lightning component that serves as the Template for the community (contains header and footer, etc).

I’ve place the Tealium iQ Container code in the Head Markup, and we do see events firing in the dev console (WASP).1.jpg

 

 

 

 

 

 

 

 

 

I’ve put this code in the Template Javascript:2.jpg

 

 

 

 

 

 

 

 

 

 

 

This was just trying to capture the page url and title.  With the console open, you can see these variables being populated, but they are not always refreshed on each click/page change.  Also the page title will not always show the title of the actual page you navigate to, but most of the time shows the Title set in the community builder, which is for the whole community/site:.

Next I tried putting the ‘utag.view’ snippet in the Template Javascript:4.jpg

 

 

 

 

 

 

 

 

 

 

However, when those lines are made active, the community will load up with a blank page.

I also tried putting all this code in the Head Markup, but then will see other JavaScript errors when the page loads.

9 REPLIES 9

Setting up Tealium IQ on a Salesforce Community website

Community Manager
Community Manager

@skozma Take a look at this doc from the Salesforce Trailblazer Community. It explains how to add custom JavaScript to your community pages:

https://help.salesforce.com/articleView?id=siteforce_code_custom.htm&type=5

I found that link from the Salesforce Developers forums here:

https://developer.salesforce.com/forums/?id=9060G000000IAcTQAW

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

Setting up Tealium IQ on a Salesforce Community website

Silver Contributor
Silver Contributor

@TealiumJustin thank you for the quick reply! I'll pass this along to our developer and update you as soon as I hear back.

Setting up Tealium IQ on a Salesforce Community website

Silver Contributor
Silver Contributor

@TealiumJustin

Our developer reviewed both links and this is what he said:

 

1st Link: " talks about how to edit pages using the site.com tool, which is the older tool they had prior to the ‘experience builder’ which is how we work on the community now.  I logged into it anyway just to check it out, but can’t see any of the pages there or do much of anything."

 

2nd link: "the last thing it says is to put the library code in the head markup which is the first thing we tried and it didn't work."

 

“The only option left that I know of is to put the scripts in the head markup in the community. When we tried this, the variable from the library was ‘undefined’ when trying to access it in an aura component. Can you provide some information on how to make sure a library is loaded so it can be referenced in an aura component, when the script is in the head markup?”

Setting up Tealium IQ on a Salesforce Community website

Community Manager
Community Manager

@skozma I'm not sure how many TLC users have the Salesforce expertise you need. I think you will have better luck if you post this question to the Salesforce developer community. Good luckl! If you find the answer, feel free to report back here.

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

Setting up Tealium IQ on a Salesforce Community website

Silver Contributor
Silver Contributor

@TealiumJustin both the Salesforce developer community and the support team haven't found a solution. I'm a bit surprised that we haven't found many people who have setup Tealium on a Salesforce Community site. Thanks for your input.

Setting up Tealium IQ on a Salesforce Community website

Silver Contributor
Silver Contributor

@skozma , before adding the utag.js script, are you defining the "utag_data" object?

Setting up Tealium IQ on a Salesforce Community website

Gold Contributor
Gold Contributor

Hi @skozma  - what version of Salesforce are you using? As I understand it, Salesforce Communities have implemented the 'Lightning Locker' functionality since version 40, which prevents 3rd party scripts from running (including GA, Adobe and Tealium). The only way I have been able to run Tealium in our pages has been to revert to V 39.  I've also had other issues with Aura components (that I haven't fully resolved) that seem to be the result of race conditions - it's really difficult to determine the order in which various Aura components load. If I have a breakthrough I'll update.

Setting up Tealium IQ on a Salesforce Community website

Silver Contributor
Silver Contributor

@Christopher_M we're on version 40. The only thing that we've found that works is to setup EventStream using image pixels to send over the data. Defintiely not what we wanted to do as it increased our workload to get the necessary tracking in place. We're in the process of setting up meetings with Salesforce to talk with them about the Lightning issue and also their out-of-the-box GA setup issues. Within Communities settings, we're able to input the GA-ID and that too has tracking errors (i.e. new sessions are being created for each pageview). Appreciate your update and will also post any updates here if we uncover them.

Setting up Tealium IQ on a Salesforce Community website

Gold Contributor
Gold Contributor

@skozma, I've done a bit more digging, and have found some Salesforce release notes that imply that the Lightning Locker can be toggled off (https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_networks_lightning_locker_t...). I'd heard that this was in the pipeline, but this is the first documentation I've seen.

I'm not in a position to be able to verify this solution, but if you're able to, I'd really appreciate any feedback as to whether it works.

I also tried inputting the GA-ID in the Communities settings, but abandoned that with same issues you report. :(

Public