URL parameters
-
I have a function (added to my functions.php) I was using for the Jetpack (ShareDaddy) social share buttons, and it was passing UTMs parameters to my Google Analytics. I can’t make it work using the Shared Counts. I am not sure what I am doing wrong here:
add_filter( ‘sharing_permalink’, ‘social_share_link_utm’, 10, 3 );
function social_share_link_utm( $permalink, $post_id, $sharing_id ) {
$ga_params = array(
‘utm_source’ => $sharing_id,
‘utm_medium’ => ‘Social’,
‘utm_campaign’ => ‘SBar’,
);
return add_query_arg( $ga_params, $permalink );
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘URL parameters’ is closed to new replies.