- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
04-18-2016 09:36 AM
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?
04-19-2016 02:00 AM - last edited on 04-19-2016 12:41 PM by kathleen_jo
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
04-19-2016 06:09 AM
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/
04-19-2016 06:43 AM
Just to add, here are some steps on the community of how to use Charles Proxy and iOS:
04-26-2016 06:42 AM
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.
04-26-2016 11:50 AM
Very clever @steve_fernandez. Thank you for sharing!
04-26-2016 01:45 PM - last edited on 04-26-2016 02:46 PM by kathleen_jo
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!
04-26-2016 02:51 PM
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;"); }
04-26-2016 02:59 PM
Awesome, @steve_fernandez! I'm sure it will help @audrey_poulin out a lot. Thank you again.
Copyright All Rights Reserved © 2008-2023