Title: URL parameters
Last modified: December 20, 2022

---

# URL parameters

 *  Resolved [theglobe001](https://wordpress.org/support/users/theglobe001/)
 * (@theglobe001)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/url-parameters-18/)
 * 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)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/url-parameters-18/#post-16307233)
 * The Shared Counts plugin does not include a filter called `sharing_permalink`
   so the code you’ve shared wouldn’t run.
 * You can use the `shared_counts_link` filter to customize the Shared Counts like.
   Note that it’s an array of settings, not a string, so you’ll want to customize`
   $link['link']`.
 * Here are a few tutorial showing you how to use the filter: [https://sharedcountsplugin.com/sc_filter/shared_counts_link/](https://sharedcountsplugin.com/sc_filter/shared_counts_link/)
 * If you’re using the standard Google Analytics JS ( `ga` ) or Monster Insights(`
   __gaTracker`), the plugin is already tracking your social share data in Google
   Analytics. [Here’s the code](https://github.com/jaredatch/Shared-Counts/blob/develop/assets/js/shared-counts.js#L25-L45).]
 * This uses Google Analytics’ social tracking feature, not UTM data.
 *  Thread Starter [theglobe001](https://wordpress.org/support/users/theglobe001/)
 * (@theglobe001)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/url-parameters-18/#post-16307423)
 * Very helpful Bill. Thank you very much for the quick response. It worked perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘URL parameters’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shared-counts_7188b5.svg)
 * [Shared Counts - Social Media Share Buttons](https://wordpress.org/plugins/shared-counts/)
 * [Support Threads](https://wordpress.org/support/plugin/shared-counts/)
 * [Active Topics](https://wordpress.org/support/plugin/shared-counts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shared-counts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shared-counts/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [theglobe001](https://wordpress.org/support/users/theglobe001/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/url-parameters-18/#post-16307423)
 * Status: resolved