tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/136-adding-codeCascade CMS: Discussion 2018-10-18T20:36:01Ztag:help-archives.hannonhill.com,2010-02-09:Comment/26998632010-08-25T17:56:54Z2010-08-25T17:56:54Zadding code<div><p>I need to add a few lines of javascript in the section a single page for google ad tracking purposes and I am having a hard time figuring out how to implement this.</p></div>christag:help-archives.hannonhill.com,2010-02-09:Comment/26998632010-08-25T18:21:42Z2010-08-25T18:22:10Zadding code<div><p>Are you putting this in a single page or one Content Type that is used across multiple pages?</p>
<p>Either way I would create a region within your Template for assigning the block of code to. I would then create an XML block to hold the code. I would wrap the javascript that you have within system-view:external tags, since you probably don't want the tracking occurring while viewing pages within Cascade (this could provide false feedback if you accidentally click the ad in your CMS instance while developing). <a href="http://www.hannonhill.com/kb/System-View-Tags/">Here is the KB page about system-view tags</a>.</p>
<p>Now depending on whether this is for one page or one Content Type, you can assign this block to a region at the Template, Configuration, or Page level depending on your setup and how many pages it should be on.</p>
<p>I hope this helps. Please let me know if you need any further clarification.</p></div>Pennytag:help-archives.hannonhill.com,2010-02-09:Comment/26998632010-08-25T18:28:00Z2010-08-25T18:28:02Zadding code<div><p>This will only be used one page as a conversion tracker for ads linking to a search form. Same principle as google analytics code except I just need it on that one page.</p></div>christag:help-archives.hannonhill.com,2010-02-09:Comment/26998632010-08-25T18:34:41Z2010-08-25T18:34:41Zadding code<div><p>Then you will need to add a region, if there isn't already one to the Template that page is using. Make your XML block that contains the script, wrap that with the system-view:external tags. Then go to your page, hit Edit, go to the Configurations tab. Assign the code on the appropriate region that you created within your Template.</p>
<p>If you have assigned this correctly, your page within Cascade should appear the same and only on your live page will you be able to View Page Source and see the included javascript code.</p></div>Pennytag:help-archives.hannonhill.com,2010-02-09:Comment/26998632010-08-25T20:58:14Z2010-08-25T20:58:15Zadding code<div><p>Thanks for the help Penny I think i figured it out.</p></div>chris