Switch to dev/qa profile for on-device mobile website testing?

Bronze Contributor
Bronze Contributor

I've been trying to troubleshoot a tag for a webpage.  Seems to be an issue with iOS devices.  I'd like to build in some alert boxes to see what's going on, but I can't figure out how to set the profile on a mobile device.  Using the bookmark for the campanion didn't work.  I see that campanion is not available for 5.x.  But, is there at least a way to force the environment?

8 REPLIES 8

Switch to dev/qa profile for on-device mobile website testing?

Tealium Employee

Hi @steve_fernandez,


One way to do this would be to set up Fiddler or Charles as a proxy for your iOS device, and use a redirection from the prod utag.js to the dev or qa equivalent.

Mark

Switch to dev/qa profile for on-device mobile website testing?

Tealium Employee

Hi again

 

Here's some links

 

http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureForiOS

https://www.charlesproxy.com/documentation/faqs/using-charles-from-an-iphone/

 

Also, it's worth mentioning that putting in Alerts to debug JavaScript is possibly not the most efficient way to track down issues.  If you have a Mac, you can step through and debug JavaScript that is running inside Safari on the iPhone.

 

http://appletoolbox.com/2014/05/use-web-inspector-debug-mobile-safari/

 

 

Switch to dev/qa profile for on-device mobile website testing?

Tealium Employee

Just to add, here are some steps on the community of how to use Charles Proxy and iOS:

 

https://community.tealiumiq.com/t5/Mobile-Libraries/Setting-up-Charles-to-Proxy-your-iDevice/ta-p/13...

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

Switch to dev/qa profile for on-device mobile website testing?

Bronze Contributor
Bronze Contributor

Thanks for the suggestion.  We added in a work around within the Tealium implementation to use a query string parameter to manually set the environment.  This had the benefit of allowing us to send the url other iOS device users in the team to get them to test the tags w/o having to walk them through setting up a proxy.

Switch to dev/qa profile for on-device mobile website testing?

Employee Emeritus

Very clever @steve_fernandez. Thank you for sharing!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

Switch to dev/qa profile for on-device mobile website testing?

Gold Contributor
Gold Contributor

Hi @steve_fernandez, would you be willing to share how you implemented this? That sounds like a great fix to a similar issue I'm having.

Thanks!

Switch to dev/qa profile for on-device mobile website testing?

Bronze Contributor
Bronze Contributor

I can't take credit for actually coming up with the method, or the code.  It's the brainchild of our team lead.

 

 

if(location.href.indexOf('tealium_dev_env_flag=true1234')>0){
  document.cookie = "utag_env_" + utag_data['ut.account'] + "_" + utag_data['ut.profile']+ "=//tags.tiqcdn.com/utag/"+utag_data['ut.account'] +"/"+ utag_data['ut.profile']+"/qa/utag.js;exp-1d;";
  console.log("utag_env_" + utag_data['ut.account'] + "_" + utag_data['ut.profile']+ "=//tags.tiqcdn.com/utag/"+ utag_data['ut.account'] +"/"+ utag_data['ut.profile']+"/qa/utag.js;exp-1d;");
}

if(location.href.indexOf('tealium_dev_env_flag=cookie_off')>0){
  document.cookie = "utag_env_" + utag_data['ut.account'] + "_" + utag_data['ut.profile']+ "=//tags.tiqcdn.com/utag/"+utag_data['ut.account'] +"/"+ utag_data['ut.profile']+"/prod/utag.js;exp-1d;";
  console.log("utag_env_" + utag_data['ut.account'] + "_" + utag_data['ut.profile']+ "=//tags.tiqcdn.com/utag/"+ utag_data['ut.account'] +"/"+ utag_data['ut.profile']+"/prod/utag.js;exp-1d;");
}

 

Switch to dev/qa profile for on-device mobile website testing?

Employee Emeritus

Awesome, @steve_fernandez! I'm sure it will help @audrey_poulin out a lot. Thank you again.

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Public