Elxis CMS Forum
Extensions => Bots and plugins => Topic started by: ipghmagnet on June 03, 2015, 05:01:20
-
Helllo Elxis Heros,
I am implementing GOOGLE ADwords. I hired some one to do it.
But he said he need to insert below to contact forms.
<!-- Google Code for Contato Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 952511834;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "zMonCMfg9FwQ2tqYxgM";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/952511834/?label=zMonCMfg9FwQ2tqYxgM&guid=ON&script=0"/>
</div>
</noscript>
So that he can check the conversion rate.
But he need when the contact form is sumitted , the thanks page will be new window with the above code..
Pls kindly help me how to do ..
Best regards.
IP GH MAGNET
-
Any one help me?
:'(
-
It is simple. Edit the contact form plugin and add your custom code.
-
Dear Datehell,
Would you please kindly show how to do ?
I have very little php code knowledge. And cannot know how to do .
Your kind support is much appreciated..
Thanks.
Guo
-
The form is been submitted using AJAX, I don't know if the code you wrote will work exactly as you have it. You may have to insert file "conversion.js" in page head before the form has been submitted. I don't know what that file does.
To answer your question as you wrote it: To add html code in form ajax response do this.
Open file components/com_content/plugins/contact/contact.plugin.php
Go to line 88:
$response = $this->processRequest($cfg, $rcptmail, $row->title, $action);
Add below:
$response .= '<script type="text/javascript">
var google_conversion_id = 952511834;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "zMonCMfg9FwQ2tqYxgM";
var google_remarketing_only = false;
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" alt="i" src="//www.googleadservices.com/pagead/conversion/952511834/?label=zMonCMfg9FwQ2tqYxgM&guid=ON&script=0" />
</div>
</noscript>';
That's all.
-
Dear Datahell,
Your kind support will be remembered forever..
Thanks a lot.
Guo
-
Dear Datehell,
I have implemented your suggestion to my website pages.
But i faced problem :
My adwords technical people said there is conversion rate. There are several contact forms sumited as per goods adwords data..
But i never got the " contact inquiry" ..
Do you have experience with this kind of problem before? Do you think " contact form plugin" always ok?
I test the contact form page and fill the form by myselve.. I can get the " contact inquiry" in my email box.
How this plugin works? Is there possiblity that it have some problem in different email address?
I am looking forward to your kind help .
Guo