PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.7.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.7.0
5.7.0 5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 All 39 releases
← All changes | core/feedback.php +21 -1 5.3.2 → 5.7.0 View file →
@@ -88,8 +88,28 @@
88 88 return $args;
89 89 }
90 90
91 91 /**
92 + * Campaign tags for links into the shop.
93 + *
94 + * forge12.com runs WooCommerce, whose Order Attribution stores the utm_*
95 + * parameters a buyer arrived with on the order. `from` alone only shows up in
96 + * server logs; these make a sale traceable to the place in the plugin that led
97 + * to it. Product links only — a feedback or support visit is not a sale.
98 + *
99 + * @param string $from Which entry point the click came from.
100 + *
101 + * @return array<string, string>
102 + */
103 +function campaign_args( string $from ): array {
104 + return array(
105 + 'utm_source' => 'double-opt-in',
106 + 'utm_medium' => 'plugin',
107 + 'utm_campaign' => $from !== '' ? $from : 'unspecified',
108 + );
109 +}
110 +
111 +/**
92 112 * Build a link to the product page.
93 113 *
94 114 * @param string $from Which entry point the click came from.
95 115 *
@@ -95,9 +115,9 @@
95 115 *
96 116 * @return string
97 117 */
98 118 function get_product_url( string $from = '' ): string {
99 - $url = add_query_arg( link_args( $from ), PRODUCT_BASE . PRODUCT_PATH );
119 + $url = add_query_arg( link_args( $from ) + campaign_args( $from ), PRODUCT_BASE . PRODUCT_PATH );
100 120
101 121 /**
102 122 * Filter a link to the product site.
103 123 *