How to use Google Analytics on my embeddable widget? - google-analytics

I'm providing a simple embeddable js widget that people can put on their site.
I'd like to track impressions and behavior.
What's the right way to integrate Google Analytics on this widget?
Most likely the host page will already have Google Analytics so I shouldn't interfere with it, and the events should be sent to my own GA account.

I have the similar needs to elado, thanks for your post.
This was my recent post https://groups.google.com/a/googleproductforums.com/d/msg/analytics/-/HuMDDvKupLQJ
Hope that its possible to simply track interactions on my widget, not concerned about the host site or blog statistics.

Related

Prestashop GA4 integration

I have question regarding integration Google Analytics 4 into Prestashop. My company has setup some years ago Universal Analytics. Now that Google forces everyone to slowly migrate to Google Analytics 4 I was tasked to do it.
I have created GA4 property, inserted gtag into site's code and connected it to the existing UA tag on the site. Everything is working fine, user's data is here except for revenue. Do I need to manually add everywhere custom events as in this documentation? https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag
I know that they are Prestashop modules for this but they are paid and because of this aren't a option. Also current Google Analytics module don't support GA4
Yes, the url you posted describes ecommerce implementation through gtag. If that's what you're doing, then yes, to get revenue, products, transactions and the rest of EEC-related data, you'll have to implement it as described there.
Most of people choose to implement GA4 through GTM since it's much easier to manage and maintain there. But if the intention is to have tracking with the front-end team, then direct use of gtag may be justified.

User comments plugin on my website using Google Analytics

is it possible to add some kind of comments form for users of my website based on Google Analytics?
Does Google Analytics have such a functionality? Or maybe some third party plugins could do it?
Thank you!
I think there is some confusion about what Google Analytics does. It is a tracking system, it has nothing to do with the functionality of the site, such as leaving a comment.
So to remove any doubt the answer is no, it does not provide any plugin to do what you want.

Track count of views,likes and comments in a community site

Can anyone tell me how can I track number of views,likes,comments and shares in a collaboration and community site. This is not a Google site. This site was created using lumapps. It's a collaboration site, Which works similar to Google+, where you can write a blog, post and like/ share the same. I need a way of keep tracking the likes/shares/views on such posts or blogs, So that I can display the same in Google data studio.
I heard it's possible using Google tag manager. Can anyone confirm this OR let me know about anyways of achieving the same.
Thanks and Regards
Kumar
You would do this by sending an event to Google Analytics and using this source in Data Studios.
Please see reference on how to send events using Google Tag Manager and custom Variables.
https://support.google.com/tagmanager/answer/6106716?hl=en

Question about setting up Google Analytics with Google Apps Marketplace

I'm not sure if this is the best place to ask this question but if theres anyone who would know this is SO. If not, where is the best place to ask this question?
At the bottom of vendor profile when you log in at http://google.com/appsmarketplace, there is a text box for you to insert your GA code.
Question: what does this do? What kind of stats am I expected to see in Google Analytics? I don't have the luxury of trial and error at the moment.
That field gives you analytics on visits to your Apps Marketplace's product page. Basically, for security reasons, Google doesn't let you add JavaScript to the page, but they provide the ability to specifically insert Google Analytics tracking.
There's a similar field on code.google.com (Google Code -- for hosting code source), the Chrome Web Store (for web apps), and non-Google sites too... this is standard practice when a website wants to let a third party embed their Google Analytics but doesn't want to give them the ability to add arbitrary JavaScript to the page.

Google Analytics on non-public pages

Is good to place google analytics in pages like admistration, article edit page, ... ?
The reason why I use Google Analytics is to give important information to my clients about how their websites are being used. Because of that I wouldnt include the admin area of the website because it doesnt affect their sales or conversions.
By adding code into the admin zone you are inflating the total pageviews. If you really want to track this information then its not a disaster, you would just need to be sure to setup a profile which filters out these urls when making business decisions with your Analytics info.
Technically I think to use Google Analytics it is supposed to be on a free, public website but I guess having some of the pages locked isnt going to get your account closed.
Yes, it keeps stats on how often you or others use admin features. I also suggest that you use Google webmaster tools on them too.

Resources