: Adding UTM parameters in WhatsApp share button, how? I'm using this code to generate the WhatsApp share button: <a href="whatsapp://send?text=<?php echo get_the_title(); ?> <?php echo get_post_permalink();
I'm using this code to generate the WhatsApp share button:
<a href="whatsapp://send?text=<?php echo get_the_title(); ?> <?php echo get_post_permalink(); ?>">Share via Whatsapp</a>
I want to add also ?utm_source=whatsapp in the URL.
How can I achieve this?
More posts by @Cugini213
2 Comments
Sorted by latest first Latest Oldest Best
I guess you're using WordPress based on the get_post_permalink() so try replacing <?php echo get_post_permalink(); ?> with <?php echo get_post_permalink().'?utm_source=whatsapp'; ?> to append the attribute onto the link.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.