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: [ross] Mail Chimp issue with URLs

Hi guys,

Bit of a delay coming back to you on this one. This same issue occurs with any Adwords, Facebook Ads, etc links, obviously for the same reason as you describe above.

Unfortunately, the fix you prescribe above does not seem to work - my home page still loads bereft of sections content.

list($home_pageRecords, $home_pageMetaData) = getRecords(array(
'tableName' => 'home_page',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
'allowSearch' => '0',
));
$home_pageRecord = @$home_pageRecords[0]; // get first record


Any other ideas?

Cheers,

Benedict

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