@jeffsyl – No, unfortunately I ended up kind of moving away from this plugin and building my own way of sending events via code snippets.
I would have:
add_action(‘gform_after_submission’, ‘send_to_gtm’, 10, 2);
And within that function, I’d check for form id and do a sitch statement based on ID. Then I’d have different logic, which actually ended up being the best way to go as I could then pass in hashed information. But it would end up looking like:
window.parent.dataLayer.push({
'event' : 'tdaContactEvent',
'tdaEventDetails': {
'eventName' : 'Generated Lead',
'eventCategory' : 'Form',
'eventAction': 'Contacted',
'eventLabel': 'AJ Tatum Digital',
'eventValue': 0,
'eventData': data
}
});
Where “data” looked like:
var data = {
'formId': 3,
'formName': 'Newsletter Form',
'firstName': '<?php echo esc_js(rgar($entry, '3.1', '')); ?>',
'hashedFirstName': '<?php echo hash('sha256', esc_js(rgar($entry, '3.1', ''))); ?>',
'lastName':'<?php echo esc_js(rgar($entry, '3.2', '')); ?>',
'hashedLastName': '<?php echo hash('sha256', esc_js(rgar($entry, '3.2', ''))); ?>',
'email': '<?php echo esc_js(rgar($entry, '3', '')); ?>',
'hashedEmail': '<?php echo hash('sha256', esc_js(rgar($entry, '3', ''))); ?>',
'businessName': '<?php echo esc_js(rgar($entry, '7', '')); ?>',
'conversionType': 'Subscriber',
'eventTime': <?php echo $eventTime ?>
};