provider Settings - Tracking PATCH /tracking_settings/google_analytics
@utdk/sendgrid /tracking_settings/google_analytics
Update Google Analytics Settings
**This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).
on-behalf-of header
string

Try it

Authentication
Configure credentials for Email Activity (beta)
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

patchTrackingSettingsGoogleAnalytics
PATCH/tracking_settings/google_analytics
**This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/).

Input

Indicates if Google Analytics is enabled.

The name of the campaign.

Used to differentiate ads

Name of the marketing medium (e.g. "Email").

Name of the referrer source.

Any paid keywords.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.patchTrackingSettingsGoogleAnalytics({
  "on-behalf-of": "The subuser's username. This header generates the API call as if the subuser account was making the call."
})