Skip to content

Commit 8a8db5b

Browse files
authored
Merge pull request #75 from searchcraft-inc/feaure/SC-1901-utm-params
Adds utm params to powered by link re SC-1901
2 parents 44b030c + dabea9f commit 8a8db5b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

public/templates/common-template-values.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,14 @@
5353
$value_attr = ' value="' . esc_attr( $search_query ) . '"';
5454
}
5555
}
56+
57+
// Build the powered by link with UTM parameters.
58+
$site_url = wp_parse_url( get_site_url(), PHP_URL_HOST );
59+
$utm_params = array(
60+
'utm_source' => $site_url,
61+
'utm_medium' => 'wp_plugin',
62+
'utm_campaign' => 'powered-by',
63+
'utm_content' => 'results-page',
64+
'sc_wp_plugin_version' => SEARCHCRAFT_VERSION,
65+
);
66+
$searchcraft_powered_by_link = add_query_arg( $utm_params, 'https://searchcraft.io/' );

0 commit comments

Comments
 (0)