Mail Chimp issue with URLs

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

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

By benedict - January 24, 2010

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