Forum
How to Add Google Adwords code
Hi
I have been asked to add cost per click code to our Perch pages. I ran a search and can only find a result for how to add Google Analytics.
Please could someone let me know if I need to add code or use a app?
Any help is hugely appreciated
You can use a regular textarea field, just add the attribute
html="true"
to stop the code being escaped.Hi Drew
I am a complete newbie to perch. Where would I add this?
Have you built a template?
No I haven't.
Hello Deb,
It sounds like you already have a website set up (perhaps built by someone else given you haven't built a template yourself?).
The Getting Started series is a good place to start if you're totally new to Perch.
This is a textarea field with
html="ture"
like Drew suggested:Hi Hussein
Yes this is an existing website that has already been set up and has Perch in place.
This clear needs to be added to the template itself. From teh getting started videos its clear that Perch only edits the actual page content.
What you edit doesn't have to be page content. The following is the default Google Analytics template that comes with Perch:
In the control panel you enter the
Web Property ID
which is required for the script to work. Just using this as an example to show that you can edit things that aren't "page content".If you are not familiar with working with templates, it might be a good idea to contact the developer who built the site.
Ok sorry my point was, that you have to add perch tags to the file in order to be able to edit any content from the control panel. Is that correct?
I need to add a Google Analytics code and surround the phone number with a script. I went through the get started videos as suggested and these clearly involve adding the perch tags to the template.
And this is the problem: I cannot get hold of the original developer to obtain this info. They're not even sure who their is website hosted with.
That's probably the place to start - get access to the hosting and then you'll be able to grab a copy of the site to your development environment and make whatever changes necessary.
Hi Deb
Then unfortunately I don't think there's much you can do until you resolve your hosting issue. Once you have ftp access to the source files, then the above solution will sort you out.
Best of luck
Jon
Ok I have the info now. The Google Analytics code I have added with no issues, but the script for the phone numbers is impossible.
The tags are for just phone numbers only, is there a way to add javascript around them?
How are you adding the phone number(s) to your page?
At the moment we have the tag
but to wrap the script around this just results in the phone number disappearing altogether
We also have a phone number field in
Surrounding plain content with
<script>
tags doesn't work. There are various ways of adding content to your page with Javascript, but this isn't one of them.I think the script finds the number on the page for you. So you may have the number some where on your page
<span>1234 567 8901</span>
and the script will find it and do whatever tracking wizardry it's supposed to do.I'd suggest reading the Adwords instructions. On step 2 of the instructions here it explains how to add your tracking tag to your website.
For example, if this is what you need to output to the browser:
You might do this:
Hope this helps!
hi Adwords to one side (it turned out to just be Analytics code, which I have now added). Its just the script surrounding the phone number that is my problem now.
I have added the script to the head section as you suggested and asked them to test the page to see if it works.
I shall let you know.
Hi I checked with the Ad agency and am please to say that its all working fine.
Thanks Hussein, Jonathon and Drew for your help