Use document ready() event to fire data layer
This commit is contained in:
parent
d984ec9b43
commit
994dbddac2
|
@ -453,7 +453,8 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
$accountDuration = $trialDurationDays - $interval->d;
|
$accountDuration = $trialDurationDays - $interval->d;
|
||||||
}
|
}
|
||||||
|
|
||||||
$code = "dataLayer.push({
|
$code = "$( document ).ready(function() {
|
||||||
|
dataLayer.push({
|
||||||
'ZipCode': '" . $postcode . "',
|
'ZipCode': '" . $postcode . "',
|
||||||
'UserID': '" . $client->id . "',
|
'UserID': '" . $client->id . "',
|
||||||
'Customer': 'Customer',
|
'Customer': 'Customer',
|
||||||
|
@ -461,7 +462,8 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
'Trial': '" . $isTrial . "',
|
'Trial': '" . $isTrial . "',
|
||||||
'Country': '" . $country . "',
|
'Country': '" . $country . "',
|
||||||
'AccountDuration': '" . strval($accountDuration) . "'
|
'AccountDuration': '" . strval($accountDuration) . "'
|
||||||
});";
|
});
|
||||||
|
});";
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
|
|
Loading…
Reference in New Issue