Description Usage Arguments Details Value Author(s) References See Also Examples
This function retrieves a Google Analytics refresh token using a supplied credentials and code. The function will use GAR_CLIENT_ID, GAR_CLIENT_SECRET environmental variables if present. A refresh token can be traded for an access token repeatedly. As a result, this should only be needed one time unless the refresh token is revoked or lost. The refresh token is stored in an 'GAR_REFRESH_TOKEN' environmental variable.
1 | getRefresh(client_id, client_secret, code)
|
client_id |
Client ID found in API Console. String format. |
client_secret |
Client Secret found in API Console. String format. |
code |
Code obtained from the redirect URL provided by the getCode() function. String format. |
Function returns a GA refresh token.
Refresh token is a string to be used in conjunction with tokenRefresh() function.
Andrew Geisler
https://developers.google.com/analytics/devguides/reporting/core/v3/
GAR
gaRequest
getCode
getRefresh
tokenRefresh
getMeta
1 2 3 4 5 | getRefresh(
client_id="ABCDEFG",
client_secret="HIJKLMNOP",
code="QRSTUVWX"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.