• Hey Folks,

    I have added google analytics code in my blog and now I have enabled unique id in google analytics, added the custom script in google analytics javascript code.

    Problem is,

    How do I generate a unique id in WordPress?
    Where should I put the custom code for generating unique id and pass it to google analytics?

    Thanks in Advance
    Joby John

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi there friend,

    I have found something close to what you are looking for in stack overflow. Generating a unique ID and relating this to the user’s WP ID is part of the problem you need to address and the code given seems to do that, although I haven’t put that to the test and YMMV.
    Also, this code would probably be best in the same snippet that you are using to add google analytics and custom script code as you mention.
    Let me know if that does the trick!

    ThanxXx,
    Dimitri

    • This reply was modified 8 years, 3 months ago by Jan Dembowski. Reason: Removed short link with real link
Viewing 1 replies (of 1 total)

The topic ‘How do i create unique id for google analytics’ is closed to new replies.