Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Track website visits

Posted on by Microsoft Employee

Hi!

 

Does anyone know how to embed the Marketing website JavaScript code into google analytics?

Thanks!

  • CaseyVaughn Profile Picture
    CaseyVaughn 5 on at
    RE: Track website visits

    Actually, it all depends on what you want to achieve. Though it’s been more than 2 years since your request, I hope it will be helpful for you and others here. So, I think you should try a different approach. Have you tried looking for a tracking service or maybe APIs? We mostly use https://apiip.net/, but you should feel free to use another service. It all depends on your goals. Anyway, it’s been more than 2 years so I’d be grateful if you told us how you solved your problem. I’ll be waiting for your reply. Thanks in advance.

  • Jetj25 Profile Picture
    Jetj25 532 on at
    RE: Track website visits

    No we did not for the website code it is works but not for the form capture

  • Kai_1 Profile Picture
    Kai_1 20 on at
    RE: Track website visits

    Hello, Did you get it working with Google Tag Manager?

  • Jetj25 Profile Picture
    Jetj25 532 on at
    RE: Track website visits

    We did put the code in google tag manager the code has been fired through the tag manager, but it does not detect in marketing app when using  form-capture

  • Suggested answer
    RE: Track website visits

    You can use it via Google Tag Manager (if you use that).

  • ShravanSuri Profile Picture
    ShravanSuri 1,255 on at
    RE: Track website visits

    Hey Dave,

    Could you please provide the scenario that you're trying to achieve here? Why do you want to place a 3rd party javascript code into Google analytics?

    Do you want to see the marketing page opens/visits and insights in your google analytics account (along with the rest of your portal/website)?

    The more details you can provide us, the better our response can be.

    Thank you,

    Shravan

    PM, D365 Marketing

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Track website visits

    Hi Dave,

    As this section said,

    Javascrip-Code is used to track behavior.

    Code in bottom field is used to render form and provides some APIs for form customization.(form load, form submit event etc.)

    If you would just like to render CRM form without track function by CRM, then only copy the bottom code on your web page where Google analytic has been enabled.

    (don't forget to add your own page to whitelist or authencate its domain)

    Regards,

    Clofly

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Track website visits

    Hi Clofy,

    pastedimage1578469566180v1.png

    That is the script I have to paste into the google anly. Thats the one the Marketing App generates itself.

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Track website visits

    Hi Dave,

    It seems that you've created a marketing form and got generated script under Form hosting tab.

    The script will works for rendering the form and track contact behavior once you paste it on a marketing page.

    As far as I know, Google analytics is another service to track website vistior behavior, it has Java, PHP, and Python version.

    (I'm not sure whether analytics.js would be also part of it.)

    Could you share more details that where do you want to embed script?

    As per my understanding, would your "Google analytics" actually means a web page that has embedded the service?

    We couldn't do any customization on the generated script and integrate it with other service, all track data will be processed to marketing application own back-end.

    Regards,

    Clofly

  • Camilla Larsson Profile Picture
    Camilla Larsson 235 on at
    RE: Track website visits

    Ah ok, Sorry I have another guy making that for me so that I am not sure about.

    Camilla

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans