***Updating to MM2.2.5 resolves this issue


Last updated: May 5, 2016

Resolution Update


We've released a new version of MemberMouse (2.2.5) with improved reliability of SmartTag processing.

Recommended Action: Upgrade to the latest version of MemberMouse. You can do this by following the steps listed inĀ Manually Upgrading MemberMouse


Problem


When using something like the following, MemberMouse SmartTags aren't being processed:

<script>// <![CDATA[

dataLayer.push({

'event': 'transaction',

'transactionId': '[MM_Order_Data name='id']',

'transactionAffiliation': '',

'transactionTotal': [MM_Order_Data name='total'],

'transactionTax': '',

'transactionShipping': '',

'transactionProducts': [{

'sku': '[MM_Order_Data name='productId']',

'name': '[MM_Order_Data name='productName']',

'category': '',

'price': [MM_Order_Data name='total'],

'quantity': 1

}]

});

// ]]></script>


Solution


WordPress escapes the closing CDATA tag (]]>) and as a result SmartTags (i.e. shortcodes) won't be processed by WordPress when included within a CDATA block. More information on this can be found here:

http://wordpress.stackexchange.com/questions/68099/prevent-add-shortcode-from-escaping-a-tag

In order to get this to work you just need to remove the CDATA tags as follows:

<script>

dataLayer.push({

'event': 'transaction',

'transactionId': '[MM_Order_Data name='id']',

'transactionAffiliation': '',

'transactionTotal': [MM_Order_Data name='total'],

'transactionTax': '',

'transactionShipping': '',

'transactionProducts': [{

'sku': '[MM_Order_Data name='productId']',

'name': '[MM_Order_Data name='productName']',

'category': '',

'price': [MM_Order_Data name='total'],

'quantity': 1

}]

});

</script>