# Track Campaign Source on Google Analytics

By leveraging this feature, you can:

* Identify which campaigns drive conversions
* Improve marketing strategy based on performance data
* Track customer behavior through your Google Analytics account

***

### How it Works ?

When generating a checkout order, you can pass Google Analytics UTM parameters in the request. These parameters will be stored and sent during the transaction process, enabling you to track attribution data in your analytics tools.

#### Request sample :&#x20;

<pre class="language-json"><code class="lang-json"><strong>"additional_info": {
</strong>        "google_config": {
            "campaign_name": "test_name_2",
            "campaign_source": "test_source_2",
            "campaign_medium": "test_medium_2",
            "debug_mode": true
        },
    }
</code></pre>

| Body Paramater                  | Type    | Mandatory | Description                                                                                                 |
| ------------------------------- | ------- | --------- | ----------------------------------------------------------------------------------------------------------- |
| `google_config.campaign_name`   | String  | Optional  | The name of the marketing campaign (e.g., `"ramadhan_sale"`). Used to group campaign results.               |
| `google_config.campaign_source` | String  | Optional  | The source of the traffic (e.g., `"google"`, `"instagram"`). Identifies where the user came from.           |
| `google_config.campaign_medium` | String  | Optional  | The medium used in the campaign (e.g., `"cpc"`, `"email"`, `"referral"`).                                   |
| `google_config.debug_mode`      | Boolean | Optional  | Set to `true` to enable debug mode, which will log campaign tracking behavior for troubleshooting purposes. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.doku.com/accept-payments/doku-checkout/additional-feature/track-campaign-source-on-google-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
