NetTalk Central

Author Topic: adding google analytic via embed  (Read 3320 times)

ntnewbies

  • Full Member
  • ***
  • Posts: 184
    • View Profile
    • Email
adding google analytic via embed
« on: April 12, 2021, 12:39:05 AM »
hi,
i have google analytic stored in a database for each customer.
i need to include it in the <head> before loading the customer page.
i have the value stored in a session value.
May I know which embed point and the code to include the script?

i have tried p_web.addscript(p_web.gsv('cus_googleanalytic')) in webhandler - add script embed point
but it is not reflecting in the source code of my customer page.

jason
nt11.51
c11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: adding google analytic via embed
« Reply #1 on: April 12, 2021, 12:53:20 AM »
WebHandler, IncludeScripts.

Cheers
Bruce

ntnewbies

  • Full Member
  • ***
  • Posts: 184
    • View Profile
    • Email
Re: adding google analytic via embed
« Reply #2 on: April 13, 2021, 01:25:45 AM »
hi bruce,
Include script adds the embed right under footer before /body

I need to add the code before /head.

i can use addscript under web server to code the script before the head. this works if i directly assign value. But at this point,  p_web.GSV not recognise and i cant get session value

i have tried addscript under web handler but it is not showing.

i have tried the following method: assign the value to returnvalue. used p_web.script.
nothing works.



jason