I'm sorry in advance if this has already been posted, I did a search and haven't found anything similar.
I hope that someone has an answer to this, as I've been trying to figure out how to do this, but without any success.
The issue is that I need to inject (somehow) a custom metric into the Product details before it gets sent to be able to override a metric value on Google Analytics.
Edit: When viewing Product details on Shopify and having set Google Analytics on the backend of the shop, it sends pageview and detail action with product details. Before that point happends, I want to inject "metric1":0 to that addProduct event. In the picture below, you can see where I need to add it.
console details
ga("ec:addProduct", {
id: "G175000BZ1TH6171",
name: "Black Mask with Activated Bamboo Charcoal",
category: "",
quantity: 1,
price: "5.36",
brand: "Development Store Tests",
variant: null,
currency: "USD",
metric1: 0 })
so I need to add "metric1":0 after "currency" in that object. As far as I found out, Shopify embeds the Google Analytics library via its own manager so anything that I add to product.liquid is called after that which is a problem. Is there any way to do this?
Any kind of help would be useful. Thank you for replying!
Shopify takes the template like product.liquid (plus sections & includes) and turns that into an HTML string that gets sent to the browser. So if you know what you are doing, there is nothing stopping you from injecting whatever you want into the product details. You are free as a bird to convert yin to yang and back before the output goes to the browser. Since no analytics operate at that stage, you are safe there. So do your magic.
Related
I'm pretty new to GA, so forgive me if this seems obvious. Also, I am not the GA admin, that is someone else.
I have written a user registration form in a WP plugin that registers users via an API to our CRM - these are not WP users being registered.
Our marketing department have asked me to also submit a GA custom dimension with the form so it can be cross-referenced in our CRM.
Looking over the GA API, I can't seem to find a way to simply 'get' the current value of the requested custom dimension, only 'create', 'set' and 'send'.
Any advice on this would be helpful - and don't be afraid to "dumb it down", or point to a section on the GA support forums!
You can't easily get the value from GA and send it to your CRM.
I think for your use case you need to look at it the other way around.
You want to get the submission ID from the CRM on the "thank you" page and "send" it to GA in a custom dimension.
I want to include a 'check my order status' link in the thank you email. Woocommerce comes with a order tracking form, but the user has to input their order id and email. Is there a way to show the tracking page without going through the input form?
I know my accounts has a view order link, but that would only work if the user is registered.
Yes, you can show an order tracking link in your email. It is a bit convoluted way and will take some time. It is much easier to let the user input his information. This makes things a lot less complicated. But if you absolutely need the order tracking in the email, then,
Put this information somewhere other than your secured site,
Make sure you update this information regularly,
Take the ID of
this information from your database and make a GET endpoint(hoping
its a web application), such that it takes in the ID number of the
information and displays it,
This GET link needs to be embedded
into a HTML form/template which you are sending as the email
If you want the whole implementation, you need to specify the tech stack you are using and other details.
If you want to show one tracking page which page customers/users can search their order status without login, then you can use the plugin Order Tracker for WooCommerce
If you use the plugin then the user can check his/her order status without login/hassle free, and also you don't need to add any extra tracking number, user can search using their order ID and phone number.
you can use it the very easy way, like making a page template or using the [cbwct-order-tracker] shortcode, anytime anywhere, and it’s also working with ajax.
You can watch the video for the plugin documentation on how to use that plugin here is the
Video Tutorial
This is my very first post on stackoverflow ever. I'm most likely doing something wrong....
I'm setting up some gtm on my site and I have a checkout page that doesn't change urls, so there is virtual page views that populate the datalayer at certain steps. I need some help how to track these events in gtm and how I can get them in to GA as page views.
I've tried to look for exact solutions but I haven't found anything that has helped me, so even linking to an article you think might help me would be awesome.
The datalayer looks like this and gets pushed at certain steps it would be /checkout 1, /checkout 2, /payment method, and finally /purchase.
Structured like this:
{
event: 'VirtualPageview',
page: '/Test/test',
title 'test | test',
gtm.uniqueEventId:25
}
Edit: I know how to set up an event to the virtualpageview, but not sure how to configure it to pas the information forward to google analytics, my goal is to make a funnel.
Just to make sure I'm answering the right thing: It sounds like you already know how to trigger an event during the checkout process, but you're not sure how to get that data into Google Analytics itself.
Assuming that what you want to see in Google Analytics is a new pageview for each step in the checkout process, you need to set the "page" field in the virtual pageview tag so that whenever it fires, it records a pageview.
In the tag, under "More Settings" -> "Fields to set", you can add "Field name": page and then set "Value" to whatever dataLayer variable stores /checkout 1, /checkout 2.
I'm trying to get the "specialties" field from the LinkedIn API but it returns nothing. So, this field is still avalible?
note: I barely use LinkedIn and I'm using my account to develop this app, so, maybe that field is empty. If it's that case, please tell where I can find it.
Basic Profile Fields
The specialties field has been removed from the API as stated here, but the API docs haven't been updated.
In my case, I can see the previous content of that field added to the summary field as plain text: "my-cv-summary \nSpecialties: my-specialties".
btw, you can test the API here https://apigee.com/console/linkedin using this URL:
https://api.linkedin.com/v1/people/~:(summary,specialties)?format=json
...and allowing apigee to connect to your profile, obviously. You'll see that no specialties field is returned, but if you had informed that field before the change, you'll see it's content added to the summary.
I embed custom links into each resume I send out, so I can see who as clicked on the links. I then take the custom value (passed through a url parameter) and pass it into Google Analytics as a session level custom variable. What I want to do is create a report that will show me all the typical information I can normally see (pages visited, time, etc), but filtered down by custom variables. i.e. I want to see that people form company X have looked at these parts of my website. I've been reading through all the documentation and feel like a custom report is the right way to go, but I'm not really sure. Any suggestions, links, instructions would be appreciated.
Create a custom report. Play around with some configuration like the following: