1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to add Google analytics code to smarty engine templates

Discussion in 'Google Analytics' started by wingstosky, May 3, 2010.

  1. #1
    The problem is Smarty template engine attempts to translate and interpret some keywords in Google Analytics tracking code that conflict with Smarty template delimiter syntax. As a workaround, Smarty does provide tags, {literal} and {/literal}, which allows a block of data to be taken literally..
    you can easily add google analytics tracking code to hostbill and other software uses smarty template engine.. To do that for hostbill just open file footer.tpl in ( yourhostbill/templates/yourtemplatename/footer.tpl ) before </body> tag add :
    {literal}
    Google Analytics Tracking Code Append Here
    {/literal}
    and it's done
    SEMrush
     
    wingstosky, May 3, 2010 IP
    SEMrush
  2. tapanp

    tapanp Peon

    Messages:
    342
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    tapanp, May 3, 2010 IP
  3. jaydeep123

    jaydeep123 Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hi friend,
    if you dont get about how to submit analytics in smarty php, you should search in google and read about that after you will submit analytics code in your site.
     
    jaydeep123, May 3, 2010 IP
  4. wingstosky

    wingstosky Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks for replies but what I mean is how to add google tracking code to hostbill templates as I explained .. may be this my fault if I choosed wrong title ..
    thanks
     
    wingstosky, May 3, 2010 IP
  5. Nusaint

    Nusaint Well-Known Member

    Messages:
    597
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    Digital Goods:
    1
    #5
    Thank you so much!
     
    Nusaint, Sep 6, 2010 IP
  6. mlotziii

    mlotziii Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    Thank you! This worked perfectly for me too!
     
    mlotziii, Mar 30, 2013 IP
  7. Daniel Stark

    Daniel Stark Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #7
    It's doen't work for me :( , i try put it in header and footer , in <head> tag and <body> tag but it doesn't work ..
     
    Daniel Stark, Jul 25, 2013 IP
  8. prabha123

    prabha123 Greenhorn

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #8
    Yes true With Literal smarty tag google analytics code work properly.
     
    prabha123, Jul 25, 2013 IP
  9. Daniel Stark

    Daniel Stark Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #9
    Thank you guys , it's worked.
    Because delay of status update so i think it doesn't work ...
    Anyway tks :D
     
    Daniel Stark, Jul 26, 2013 IP
  10. Master Directory

    Master Directory Well-Known Member

    Messages:
    3,352
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    135
    Digital Goods:
    1
    #10
    yep im using the same method anyway
     
    Master Directory, Feb 11, 2016 IP