Copied to clipboard

Flag this post as spam?

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


  • Sagar 74 posts 275 karma points
    Jul 08, 2016 @ 11:01
    Sagar
    0

    GA code

    How to implement GA code Code plz...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 08, 2016 @ 11:17
    Jan Skovgaard
    1

    Hi Sagar

    If it's the GA standard tracking code you can choose to simply put the GA script in the <head> section of your layout/master template or whatever the template/view where you have your <head> is called in your solution.

    If you want the client to be able to insert the script you can create a textarea field somewhere in the Umbraco solution where you then use a partial or macro to fetch the content and render it in the <head> section.

    Does this make sense? :)

    /Jan

  • Sagar 74 posts 275 karma points
    Jul 08, 2016 @ 11:31
    Sagar
    0

    Actually i am new to ga, i need the steps or the code for this implementation. :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 08, 2016 @ 11:50
    Jan Skovgaard
    1

    Hi Sagar

    Ok, but how are you rendering content like bodytext etc. currently? Are you using @Umbraco.Field or Razor?

    Rendering the content from the textarea is same approach as rendering a normal bodytext etc.

    You need to log in to the google analytics account of your client and get the code from there - You log in here https://analytics.google.com/ - Or perhaps ask your client to send you the GA code that should be used.

    When you have it then copy it to the texarea in Umbraco and render the content of the field in your view.

    Does this make any sense? :)

    /Jan

  • Sagar 74 posts 275 karma points
    Jul 08, 2016 @ 12:20
    Sagar
    0

    yeah thanks Jan i got it :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 08, 2016 @ 12:21
    Jan Skovgaard
    1

    Cool, don't be shy to ask further questions in case you get stuck. This is a friendly forum even though some people add some harsh comments from time to time but don't mind the few :)

    Have a nice day Sagar and happy coding!

    /Jan

  • Adam 1 post 71 karma points
    Jul 08, 2016 @ 11:40
    Adam
    0

    If you go here, this will help you out a lot!!!

    http://bfy.tw/6eIM

Please Sign in or register to post replies

Write your reply to:

Draft