---
title: "nw_parameters_set_attribution(_:_:)"
framework: network
role: symbol
role_heading: Function
path: "network/nw_parameters_set_attribution(_:_:)"
---

# nw_parameters_set_attribution(_:_:)

Sets a flag that indicates whether the network request originates from the developer or the user.

## Declaration

```swift
func nw_parameters_set_attribution(_ parameters: nw_parameters_t, _ attribution: nw_parameters_attribution_t)
```

## Parameters

- `parameters`: The network parameters to update.
- `attribution`: An indication of whether the network request comes from the developer or from the user.

## Mentioned in

Indicating the source of network activity Inspecting app activity data

## Discussion

Discussion If you don’t set this flag, the system assumes a value of nw_parameters_attribution_t.developer. Use this default value for any network request that your app makes that isn’t explicitly from the user. This includes requests that you make to your own server, even when you load user data. It also includes links that the user selects, but that you modify in any way — including by adding HTTP headers — before loading the content. Set this value to nw_parameters_attribution_t.user only for requests that the user explicitly makes, like when the user enters a URL or taps or clicks a URL that they can read, and only if your app loads and displays the data without altering the request.

## See Also

### Traffic Attribution

- [Inspecting app activity data](network/inspecting-app-activity-data.md)
- [Indicating the source of network activity](network/indicating-the-source-of-network-activity.md)
- [nw_parameters_get_attribution(_:)](network/nw_parameters_get_attribution(_:).md)
- [nw_parameters_attribution_t](network/nw_parameters_attribution_t.md)
