Where to find the Profile ID in Google analytics connection node

Hello there,

I followed the tutorial to setup a connection between google analytics account mentioned here and knime analytics platform. I followed all the steps:

-create project and API credentials
-give permission in GA to the service account email
-download and use the p12 key generated

But now I’m blocked here:

I don’t know where to find the profile ID to insert.
Any suggestions?

Thanks in advance.

1 Like

Hi there @gujodm,

that is pretty old (2014) tutorial/blog and not sure how accurate it is. And probably things changed on Google’s side as well. You can check this topic for more info in general: KNIME Google Authentication API Key Walkthrough

Regarding Profile ID - have you tried searching web for it to figure out what it is and where to find it? Google mentions something like “The 8 digits that follow the “p” are your profile ID…”

Br,
Ivan

2 Likes

I double checked the thread and I think I already made all the correct steps.
It’s just that I’m stack on the Google Analytics Connection node with this Profile ID.
Maybe @Tyler has an idea of where to get it?

1 Like

Hellos,
Finding profile ID for Google Analytics on KNIME analytics platform… we got this


Profile ID that will be used for this connection, i guess you could call this rather unclear node descriptions, i would agree. However it’s a set of numbers, an integer. “56666666” looks like this in knime. I’m using table creator to loop a variable PER profile id.

Screen Shot 2020-04-06 at 10.09.43 AM

The profile ID is the numbers in your google analytics OR in the node described above, if your api key is setup right, you will see all the available web properties, as you swap these properties you will begin to see profile IDs related to your website or clients website.

image
“im deleting content in this screenshot above” Each drop down has content. Profile is related to different ways you filter your analytics environment, and you can have many profiles PER web property, web property is 1 to 1 with profile ID.

For me, i like looping all of my sites through the same query, and building a single table for all the websites. And i write that website name from table creator to constant value column. so at the bottom of the google analytics connection dialog screenshot, you can see profile_id is a parameter.

I can loop through each profile ID…

Before this works… There’s more work.

A website they must give you access… Really important part here…

You have to have a service account setup a node before this in the google authentication api key. And that same emai, goes in this setup…


You click this buttoon to add the service account

Screen Shot 2020-02-27 at 5.54.13 PM
This is the “add user section” of Property user mgmt…

if you haven’t fallen asleep yet, you can run your workflow now :slight_smile:

Google analytics offers the values in the UI in a few locations, however if you have your API key setup correctly before this, you will be able to see anything and everything this particular service account can access, and that means you can also get the profile id from this node.

Good luck
Best,Tyler

3 Likes

@Tyler thanks for the reply and the help. I’m exactly there but for some reason it doesn’t work. I have created the api key and followed all the steps to add permission to the new user in google analytics. NBut for some reason the connection is not working. I have uploaded the P12 key and followed the procedure. I also put a circle to show you the profile ID that I insert in the node.




In the knime console I got:

ERROR Google Analytics Query 2:97       Execute failed: 400 Bad Request
{
  "error" : "invalid_scope",
  "error_description" : "Invalid OAuth scope or ID token audience provided."
}
1 Like

You’re so close I can taste it… Congrats

Notice in the little settings box with your p12 key file location…

Second to last screenshot here.
b64149a6634cd9307fe03221ccef54368fb295a0_2_546x500

Notice the button on the bottom right, “Add”

Drop down to the left is the SCOPE… You want to set your scope to…

https://www.googleapis.com/auth/analytics.readonly

Which means you need to do the drop down, click on it, then click ADD, and then scopes will be populated. Notice the error says “invalid_scope” that’s because not having a scope is a bad request in this tool setup.

If this is empty, it won’t work.
Screen Shot 2020-04-10 at 9.44.36 AM

Here’s mine…
Screen Shot 2020-04-10 at 9.45.29 AM

Alright let me know if this works out mate. Cheers.

Just checking my last post, I totally forgot to mention the scopes I believe, so for that I’m sorry.

4 Likes

@Tyler thank you very much!!! It works :smiley: you made my day!

Last question: what kind of data I can query from GA?
Is there somewhere a documentation in regards to what to query? Cause form the node explanation I see that we can get some dimensions and metrics, but they need to be filled manually.
Cause as like that I don’t understand very well what to do… as example if I want the pageviews or unique specific for channel? Or other data that I can see within the GA dashboard?

Thanks in advance.

1 Like

Hey @Gujodm, happy to help. Here’s what is nice about this part of the solution, it’s up to you and your imagination.

As you use the product, be sure to document, copy and paste, and build NEW QUERIES as you go.

Don’t be afraid to get away from your current query and try to go another direction…

The more data you make relevant, the more conversations you can begin having about the state of your customer behavior.

You can run the “geographic” analysis direction, but if client is a “local shop” geographic might be a source of saying “they are spending click ads in India, but office is only located in London.” Silly example however I hope that helps.

For me, I googled each piece within this window until things started “clicking” in my head.
Screen Shot 2020-04-10 at 10.13.20 AM

User type is a beautiful transition to explaining what you can do to learn more. If this description doesn’t fly, I would recommend typing “userType” into google and also include “google analytics” as keywords to search. GOOGLE has verbose documentation that clearly defines these things, where I usually like to pad that documentation in a “tooltip in tableau software”, to help end user adoption.

Okay last but not least, due to this very opinionated aspect of how to look at ones domain, here’s a quick view of something I thought was relevant for my domain.
Screen Shot 2020-04-10 at 10.13.24 AM
I showed this to small business, they didn’t understand anything OR take away any value… and even though i can explain the value, they simply didn’t think it was value-able… So what works for some folks might not work for other folks…

Edge use case… best I can recommend atm is to type some notes in your annotations, copy paste a lot of different queries, and take lots of notes… until they allow images in the annotation too , which would require no typing for documentation and allow you to quick snap shot the settings and give you that blimp view of settings per tool, in the same canvas. This is def for me to be able to scale a “digital agency” style solution and develop as fast as possible without having to open something to see the settings.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.