> For the complete documentation index, see [llms.txt](https://docs.emaillabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emaillabs.io/en/email/email-api/settings/smtp-accounts/google-analytics/google-analytics-configuration.md).

# Google Analytics Configuration

To configure Google Analytics for emails, follow these steps:

* Go to the SMTP server settings.
* Locate the Google Analytics option and toggle the switch to activate it.

<figure><img src="/files/QgBO6wEcplq8vegV7nOS" alt=""><figcaption></figcaption></figure>

* Select the ‘Add new rule’ option.
* Set the rule for:

  • From field (sender’s email address) or

  • Subject field of the message.
* In the ‘Search Phrase’ field, enter the expression that the system will look for in the message fields to apply the appropriate rule.
* In the ‘utm\_campaign’ field, enter a unique campaign name that will be visible in Google Analytics, allowing for easy monitoring of the results for that specific campaign.
* For messages that do not meet any defined rule, the system will automatically assign the default campaign name *default*.

<figure><img src="/files/FP0N01P4w6iJtNwu9D5y" alt=""><figcaption></figcaption></figure>

Once this feature is enabled, the system will automatically add tracking parameters to links in email messages, allowing for the analysis of traffic and recipient behaviors in Google Analytics.
