diff --git a/docs/custom-event-goals.md b/docs/custom-event-goals.md index 2310c4e5..2f0dee9d 100644 --- a/docs/custom-event-goals.md +++ b/docs/custom-event-goals.md @@ -209,6 +209,33 @@ Once you’ve made the necessary changes, simply click "Update goal," and your u Custom properties can be attached to events to capture dynamic elements and to further break down goal conversions. You can use custom properties to create your custom metrics to collect and analyze data that Plausible doesn't automatically track. [Learn more here](/custom-props/for-custom-events). +### Automatically attached properties + +#### `url` + +For clicks on links (`` elements) tagged with `plausible-event-name=...`, we automatically track where the link is pointing (its `href` property). + +:::note +This property is not automatically attached when the tagged `` element is within `` tags. +::: + +There's no additional processing on our side for this value and the value of `href` is stored in full. If you're tagging links that contain sensitive data, you may want to stop this value from being sent. You can do so by providing the following `transformRequest` option when initializing the tracker. + +```javascript +function omitAutomaticUrlProperty(payload) { + if (payload.p.url) { + delete payload.p.url + } + return payload +} + +plausible.init({ + transformRequest: omitAutomaticUrlProperty + // ... your other init options +}) +``` + + ### Monetary values to track ecommerce revenue You can also send dynamic monetary values alongside custom events to track revenue attribution. Here's how to set up the [ecommerce revenue tracking](ecommerce-revenue-tracking.md).