How to deploy multiple Soasta RUM tags when using the same iQ profile?

mark_jaggers
New Member
mark_jaggers

I have multiple sites in iQ that use the same profile.  I need to deploy Soasta mPulse RUM to these different sites.  They each have a different API key for mPulse.  I was reading https://community.tealiumiq.com/t5/2-Tealium-iQ-Documentation/Deploying-the-Soasta-RUM-tag-through-T... and it says to set the load rule to "all pages" 

 

1. what is the best way to deploy multiple Soasta tags in the same profile?

2. the Soasta tag tips say that the API key cannot be mapped, so I assume I cannot use a lookup table for different keys.  This would mean I need to create multiple tags in Tealium.

3. I dont want all Soasta tags to fire on all pages, so if I set the load rule to only the specific domain then I looks the ability to bundle the libs.

 

 

any sugggestions?

 

thanks

 

3 REPLIES 3

How to deploy multiple Soasta RUM tags when using the same iQ profile?

steve_long
New Member
steve_long

Are the different sites all on different domains or page/page sets? Maybe I'm oversimplifying, but would it work to just create a load rule specific to each site and then use the load rule for individual tags with the proper API key?

Highlighted

How to deploy multiple Soasta RUM tags when using the same iQ profile?

tom_rollinson
New Member
tom_rollinson

I've had a similar situation with another vendor's tag, where there were multiple keys for different sites.

 

**This way is advanced, however when in place, a tidier way to link multiple API keys to the tag - Consult Tealium before comitting to this route**

 

Within the tag template for Soasta M-Pulse you can view the actual javascript made to call the Soasta tag; at this point I haven't tested on the Soasta tag itself, but it appears to be rather similar to a tag in which I have used this method on. The only downside to this is that the maintainence is limited to editing this version of the Soasta template and therefore some options (such as the api key option) in the menu will no longer work.

 

Anyhow, here goes:

 

1.) Open up the tag template for Soasta through "Manage Templates".

2.) Copy code into a Text Editor, handy having syntax colouring on as it makes it easier to read

3.) Look for the section of the code which normally pulls in the API key from the tag, labelled "##UTVARconfig_apikey##". This is where the tag menu is setting the api key that you enter in; this is where we need to dynamically set the API Key.

4.) My recommendation is to set up a function which looks at a particular parameter on the page that identifies which site you're on and then sets the key based on that parameter. For example see below if I was to set this up by document.domain:

 

  var setApiKey = function(domain) {
    var apiKey = "";
    if(domain == "www.test123.com") {
      apiKey = "abc123";
    } else if(domain == "www.123test.com") {
      apiKey = "123abc";
    } else {
      //Catch all
      apiKey = "321cba";
    }
    return apiKey;
  }

All I would need to do now in terms of the Soasta template code would be to edit the string which is being generated "js.src":

 

  doc.open()._l = function () {
    var js = this.createElement("script");
    if (dom) this.domain = dom;
    js.id = "boomr-if-as";
// This is where the key needs to be generated
    js.src='//c.go-mpulse.net/boomerang/' + setApiKey(document.domain);
// End
    BOOMR_lstart = new Date().getTime();
    this.body.appendChild(js);
  };

 

A really important thing to remember if you're thinking of doing it this way is that the variable which you're checking against needs to be populated before this tag fires every single time otherwise each hit might be defaulted to the catch all API key.

 

Now in terms of "certain pages", it might be worth you giving us an example and if possible a description of how many pages you're looking to get this tracked on as you might be able to use a positive list of pages to match in the same template.

 

**This is untested as I don't have genuine API keys for Soasta, but is a very similar method I used for a very similar vendor tag**

 

How to deploy multiple Soasta RUM tags when using the same iQ profile?

mark_jaggers
New Member
mark_jaggers
Thank you for the help. I was really hoping I could use a lookup table but I think I will just do separate tags so that I do not have to modify the tag template for SOASTA.