Your Webmecanik Automation instance is now on a sub-domain like automation.mysite.com ("automation" is an example, you can choose the subdomain of your want).
To allow the tracking script, the forms and the pop-in to continue working on your website. you will need to modify the address in the javascript scripts that call them.
TRACKING SCRIPT :
Your script look like that :
<script>
(function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)})(window,document,'script','https://myinstance.automation.webmecanik.com/mtc.js','mt');
mt('send', 'pageview');
</script>
Here your instance is named "myinstance" and the domain is the Webmecanik one.
You will simply need to replace this part of the URL with the sub-domain you created in the previous stept (in our example automation.mysite.com) :
<script>
(function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t), m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)})(window,document,'script','https://automation.mysite.com/mtc.js','mt');
mt('send', 'pageview');
</script>
Seek and replace this address in all your website pages where the script is in place.
Seek "mtc.js" in your website code to quickly find the code to replace.
THE FORMS :
For the forms inserted in automatic mode, proceed the same way as for the tracking script.
Once the redirection is done, the address in the scripts for each form will be changed by the one of the sub-domain you choose.
The script will be like this :
<script type="text/javascript" src="//myinstance.automation.webmecanik.com/form/generate.js?id=187"></script>
to :
<script type="text/javascript" src="//automation.mysite.com/form/generate.js?id=187"></script>
Replace the address in the code of each form on your site to make them running again.
Seek "generate.js" in your website code to quickly find the code to replace.
In manual mode :
<script type="text/javascript">
/** This section is only needed once per page if manually copying **/
if (typeof MauticSDKLoaded == 'undefined') {
var MauticSDKLoaded = true;
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://myinstance.automation.webmecanik.com/media/js/mautic-form.js';
script.onload = function() {
MauticSDK.onLoad();
};
head.appendChild(script);
var MauticDomain = 'https://myinstance.automation.webmecanik.com';
var MauticLang = {
'submittingMessage': "Merci de patienter..."
}
}
</script>
Devient :
<script type="text/javascript">
/** This section is only needed once per page if manually copying **/
if (typeof MauticSDKLoaded == 'undefined') {
var MauticSDKLoaded = true;
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://automation.mysite.com/media/js/mautic-form.js';
script.onload = function() {
MauticSDK.onLoad();
};
head.appendChild(script);
var MauticDomain = 'https://automation.mysite.com';
var MauticLang = {
'submittingMessage': "Merci de patienter..."
}
}
</script>
So there is 2 urls to modify in this case :
POP-IN :
Proceed the same way as you do for the forms replacing urls in the code :
replace the urls in :
<script src="//myinstance.automation.webmecanik.com/focus/2.js" type="text/javascript" charset="utf-8" async="async"></script>
By :
<script src="//automation.mysite.com/focus/2.js" type="text/javascript" charset="utf-8" async="async"></script>
Seek "focus" in the website code to quickly find the code to remplace
Your tracking, forms and pop-in works fine again.
Comments
0 comments
Please sign in to leave a comment.