---
title: Filter HTML additional tracking code
url: "https://www.seopress.org/support/hooks/filter-html-additional-tracking-code/"
lang: en-US
updated: 2021-09-29
hook_name: seopress_gtag_after_additional_tracking_html
required_version: 3.5
---

# Filter HTML additional tracking code

- **Hook name:** `seopress_gtag_after_additional_tracking_html`
- **Required version:** 3.5

```php
function sp_gtag_after_additional_tracking_html($html) {
	$html = $html.' my custom tracking code here';
	return $html;
}
add_filter('seopress_gtag_after_additional_tracking_html', 'sp_gtag_after_additional_tracking_html');
```

Source: [https://gist.github.com/wp-seopress/72b8d116b44d78431cf6c58509a3241a](https://gist.github.com/wp-seopress/72b8d116b44d78431cf6c58509a3241a)



