Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yvette 2 posts 22 karma points
    Sep 22, 2010 @ 18:48
    Yvette
    0

    Tacking code

    I'm trying to innstall a Hubspot tracking code on our pages, but I can't find how and where to do it. When I click the "HTML" button I don't get the whole source code. Can somebody please help...?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 22, 2010 @ 19:21
    Tom Fulton
    0

    You'd probably want to do this in your Template(s) rather than the WYSIWYG - check Settings -> Templates.  Typically there is one Master template that all the child templates inherit from, and you can add the code here.

  • Yvette 2 posts 22 karma points
    Sep 23, 2010 @ 11:17
    Yvette
    0

    Thanks for the tip! Did'nt have access to the template at first, but now I do! :)

  • Kim Andersen 1447 posts 2197 karma points MVP
    Sep 25, 2010 @ 15:27
    Kim Andersen
    0

    Hi Yvette

    What I usually do is creating a new property on my homepage-node in Umbraco. The property must be of the type: Textbox multiple. Inside of this textbox the customer/webmaster can copy/paste all the tracking codes that they want.

    Then I'll create a XSLT-macro with a small piece of code:

    <xsl:if test="$currentPage/ancestor-or-self::*[@isDoc][@level=1]/tracking != ''">
        <xsl:value-of select="$currentPage/ancestor-or-self::*[@isDoc] [@level=1]/tracking" disable-output-escaping="yes"/>
    </xsl:if>

    Then I place the macro in my master-template the place where I want the tracking-code(s) to be rendered.

    I think it's a good way of doing it, so that if a customer someday needs to insert a new tracking-code, they don't have to change the templates, but just insert the code in the tracking-textbox on the homepage.

    Just my 5 cents :)

    /Kim A

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies