Mail Chimp issue with URLs

5 posts by 3 authors in: Forums > CMS Builder
Last Post: January 25, 2010   (RSS)

By benedict - July 15, 2009

Hi guys,

Have run into a problem with links to my CMS website when clicked via an email sent from mailchimp.

Obviously MailChimp wants to add some tracking into the URL (like all mail programs I've come across), so if a visitor clicks the web address in the email:

www.myclient.com.au

they get taken to the URL:

http://www.myclient.com.au/?utm_source=Untitled+List&utm_campaign=54b1cc5687-Invite_Confidant_23_2009&utm_medium=email

Now, as a result the page appears but the detail viewer content for the home page does not appear, so obviously the numbers in the MailChimp URL are screwing with it?

This happens with all URLs throughout the site, no matter which page I link to.

Any ideas what we can do in this situation because Mail Chimp is as important to our service offering as CMS Builder is.

Cheers,

B

Re: [benedict] Mail Chimp issue with URLs

By benedict - July 15, 2009

Following this up further, my research with MailChimp found this in their knowledgebase:

A link for the sake of page security is designed to fail if a query value outside of what's expected is fed into the page.

If either of the above cases exist, your only option to fix would be to either disable tracking our Google Analytics tagging OR update your website code to allow the following external variables to be placed in a traditional fashion:

utm_source=
utm_campaign=
utm_medium=


Is there any way to allow those external variables to be placed in the URL as described?

Re: [benedict] Mail Chimp issue with URLs

By ross - July 16, 2009

Hi Benedict

Thanks for posting!

What's happening there is CMS Builder by default will run searches in your database for each of the variables you pass it in the URL. Of course, when those variables are related to another script, they likely won't exist in your CMS Builder database. What you will want to do here is tell CMS Builder to not run a search with those variables. To do that, try adding this to each of your viewers on that page:

'allowSearch' => '0',

Give that a shot and let me know how you make out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [benedict] Mail Chimp issue with URLs

By Chris - January 25, 2010

Hi benedict,

Try removing this line:

'where' => whereRecordNumberInUrl(1),

What's happening is CMS Builder is examining the query string and taking the last number in it, then attempting to look up a record number using that number.

In Single Record sections, you can safely drop that line. If you have this problem with any Multi Record sections, you'll need to change the way your links to detail pages work. Specifically, you'll need to change your list page links from <?php echo $record['_link'] ?> to detailPage.php?num=<?php echo $record['num'] ?> and your detail pages' where clauses from whereRecordNumberInUrl(1) to "num = '".mysql_escape($_REQUEST['num'])."'"

I hope this helps. Please let me know if you have any questions, or need any help!
All the best,
Chris