Skip to Content
Menu

Add GA4 Linker for tracking across multiple domains

January 14, 2025

Additional Notes

PHP
//Add GA4 linker for cross-domain tracking
add_action(‘nebula_ga_before_pageview’, function(){
//The below code is inside of a script tag already, so it is JavaScript (not HTML):
?>
if ( nebula?.pageviewProperties ){
nebula.pageviewProperties.linker = {
domains: [‘example.com’, ‘testing.com’]
};
}
<!--?php <br ?--> });
Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!