With v2.01 of EDD Social Discounts a new filter was introduced for modifying the sharing URL. By default, when a user shares your product to one of the various sharing services, only the product’s URL is shared.

One great use case of this new filter is to automatically append a string to the sharing URL. This makes it possible for you to better track customer purchases through services such as Google Analytics.

Paste the following function below (mind the opening PHP tag) into your child theme’s functions.php or custom plugin. Modify the string accordingly to suit your needs.