How to get all available dimensions in Marketo API? - marketo

How can I get the list of all dimensions available to pass to the api to get data to construct the chart on the fly?
For example in this case, the dimension is Source:
http://www.marketo.com/_assets/uploads/ContentVideoTier/96/reports-analytics-roi.png?20131014201216
In google analytics, I can pass the dimensions available from the list here (https://developers.google.com/analytics/devguides/reporting/core/dimsmets) via the api and it will give me the data that I can display in a chart.
How can I make similar behaviour in Marketo?
Thanks.

The list of standard fields on a lead record in Marketo is available here.
In addition to the standard fields, a Marketo user can add custom fields to their account. To get a list of all fields in a specific Marketo user's account, query the Describe REST API.
Lead activity data is also available through the Marketo API. To get a list of available activity types, query the Get Activity Types REST API.

Related

Retrieve Google Analytics 4 event parameters via API

Google Analytics (particularly version 4, "GA4") has various predefined events, each with its own parameters. E.g. the purchase event has an items parameter, which contains data such as item_id and item_name for each purchased item. JS code on a website can send these events and pass the extra data, and I can actually see the data in the "Analysis hub" in the Google Analytics interface.
Is there a way to also fetch this extra data using the Google Analytics Data API? There is a way to retrieve some predefined dimensions and also "custom dimensions" (via customEvent:parameter_name), but e.g. purchase item data doesn't seem to be a part of that.
Do I have to define custom dimensions (e.g. a purchasedProductId) and send them in addition to the items parameter, if I want to access this data via API?
Jan,
Ecommerce reporting is not yet supported in the Google Analytics Data API. I will update this question once I have more information about the timeline of this feature implementation.
Thanks,
Ilya
The Google Analytics Team

Pushing specific visitor ID into GA as personal identifier (Pardot)

I am trying to get to a point where I can identify visitors who are generating website Goals. And identifying them via their Pardot ID-s in GA.
Do you think that's possible?
On the site every visitor gets a Pardot cookie and in that there is a readable Visitor ID which via an API query can be turned into a Pardot ID.
But how can this piece of information get stitched to the rest of the GA parameters? How to push this into GA as a custom data point so I can create a report on who are the Pardot IDs that completed a certain goal this week?
Is there any guidance you can give?
Assuming, that Pardot ID itself is not a Personally Identifiable Information (PII) in terms of Google Analytics, there are several ways to accomplish this.
You could provide this data as User ID, which helps Google Analyitcs to identify users across several browsers and devices. However, this dimension is not exposed on the reporting GUI or the reporting API. (Available dimensions and metrics can be browsed here.)
Instead, or in parallel, you could store this information in a custom dimension, which, can be used in standard or custom reports, or via the reporting API as well. There a couple of things to consider. According to the Measurement Protocoll reference, the maximum length of this field is 150 bytes. You should also decide, if this dimension is most useful for your needs and possibilities on hit, session or user level, about which you can read here.

How to track Registration form fields with Custom Variables in GA

I have a registration form with default fields and one drop down with 5 values say 1 - 5 And this field is mandetory.
How could i track this values thorugh Custom Variables for successful registered users?
What would be the other options if we cont track this through CV's?
Custom variables are pretty much a thing of the past - Universal Analytics has custom dimensions which are conceptually different and are not very well suited to store form input. Plus there is the danger that the form contains info that can be used to identify a person, and it's against Googles Terms of Service to store that in Google Analytics.
One possible way to solve this would be to create a Spreadsheet on Google Drive and publish it as a webapp to store the form data along with an anonymized ID per user; the same user id would be set as a session based custom dimension in Google Analytics. Using the Google Analytics Spreadsheet add-on or a bit of bespoke Google Apps Script you could then pull the relevant metrics per id into the spreadsheet to create your reports.

Google Analytics custom dimension and metrics

Can i create custom dimension or metric with google analytics Management API? (Or other API...)
On January 23, 2015 the Google Analytics team released a change allowing for the creating of custom dimensions and metrics via the Management API.
Custom dimensions and metrics in the Management API allow you to create, get, list, update and patch custom dimensions and metrics for a Google Analytics property.
It is split up into two sections of the api Custom dimensions and custom metrics.
Not sure what language you where using so I cant help you with any sample code. I suggest you check the documentation.
Nope. Full reference for the Management API is here.
It doesn't include custom dimensions. Would be nice though, I agree.
The Provisioning API lets you create accounts, but that is in closed beta to AdWords partners at the moment. But however an account is created, the Management API is the one that lets you edit features such as filters at the moment, so would be where custom dimensions/metric control should also sit when available.
The collection APIs then let you send data to your custom metrics and dimensions once you have created them in the admin section of your web property.
Custom Dimensions and Metrics can be created in php for sure https://github.com/google/google-api-php-client
$dimension = new Google_Service_Analytics_CustomDimension();
$dimension->setName('[name]');
$dimension->setScope('[scope]');
$dimension->setActive(TRUE);
$client->management_customDimensions->insert('[webPropertyId]', '[analytics-account]', $dimension);
"$client->management_customMetrics" can be used in a similar way for metrics.
Gathering Data
In order to send data Google provides collection APIs and SDKs.
Configuring Accounts
Google Analytics provides programmatic access and management to configuration data through the Management API and account creation capabilities through the Provisioning API.
Reading Data
Google Analytics provides a simple and powerful APIs to retrieve report data from Google Analytics.
To answer the OP: you create custom dimensions and metrics via the collection API.
Dimensions: Describe data
A dimension is a descriptive attribute or characteristic of an object that can be given different values. For example, a geographic location could have dimensions called Latitude, Longitude, or City Name. Values for the City Name dimension could be San Francisco, Berlin, or Singapore.
Browser, Exit Page, Screens, and Session Duration are all examples of dimensions that appear by default in Google Analytics. Dimensions appear all of your reports, though you might see different ones depending on the specific report. Use them to help organize, segment, and analyze your data. In some reports, you can add and remove dimensions to see different aspects of your data.
Metrics: Measure data
Metrics are individual elements of a dimension that can be measured as a sum or a ratio. For example, the dimension City can be associated with a metric like Population, which would have a sum value of all the residents of the specific city.
Screenviews, Page per Session, and Average Session Duration are examples of metrics in Google Analytics.
Dimensions vs Metrics: What’s the difference?
Definitions: Goals, Metrics, KPIs, Dimensions, Targets

Google Analytics API - Retrieve Index/Name of Custom Dimension or how many used up

I have a service that pushes data into GA Custom Dimensions/Variables. Before I push I want to know which Custom Dimensions are available to push to and I also don't want to duplicate so if I have the unique name (because I would create unique names) of a Dimension I can check that too.
Anyone know how this can be done? I have searched through the API docs and it doesn't seem like it's anywhere.
Any help would be appreciated!
Thanks!
You can use the Core reporting api to get the names of the dimensions Custom Variables or Columns - Dimensions & Metrics Reference Then select then you can run a request against it to see what values are already stored.
Make sure you look into a service account don't go with normal Oauth2.

Resources