• Resolved Dekadinious

    (@dekadinious)


    I am tracking conversions by redirecting users to a thank you page after sign up. My problem now is that a conversion fired on my page, and I have tracked the conversion so I know it stems from the sign up page and not a direct visit.

    Nobody was added to my list after this conversion. What can be possible explanations for this?

    Another question is, would it be possible to mark a page as a “thank you”-page, so that direct visitors are redirected to the sign up form page? And the only visitors who can actually visit the thank you page must have come from the form redirect?

    This way you can avoid potential conversions that have not signed up.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @dekadinious,

    I can think of a few ways you got a conversion without getting a new member on your list. Are you using double opt-in? If so, users will be redirected to the thank you page before they’ve confirmed the subscription in their email. Another reason could be the one you described – users going to that page directly (maybe from a search engine?)

    There’s no built-in way to designate a “thank you” page. However, if you’re familiar with custom code we could build something like that. For example, let’s say you’re redirecting to the page example.com/thank-you. If we change this to example.com/thank-you?subscription=1, we can add custom code to your site to check for the “subscription=1” on the thank you page and redirect any user who doesn’t have this variable in their URL. Let me know if you’d be interested in doing that.

    All the best,
    Kevin.

    Thread Starter Dekadinious

    (@dekadinious)

    Hi Kevin, and thanks for answering.

    The think is that I have just started, so it’s really easy for me to track the one person landing on that page, and they came from the subscription form page. I have not yet ranked in SERPs and I have also disabled all thank you pages in Yoast SEO, Sitemap etc. They should not rank as I understand it. I don’t have double opt-in, so it’s not that either. It was kind of wierd.

    Yes, the solution you are proposing is very interesting, because that way any direct visits will not be tracked as conversions because the page will not load. I have multiple thank you pages and more will be added, that need to be redirected to the corresponding page for the sign up form that the thank you page is for.

    Please let me know how to proceed!

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @dekadinious,

    Can you send me the URL to one of your forms? I’d like to test it out.

    This is how I set up my thank you page.

    1. First I set up my redirect settings like this https://imgur.com/a/AsIwU.
    As you can see, the URL is /hello-world?thank-you=1. To make this work for you, just enter the URL of your own page and include the ?thank-you=1 at the end.

    2. Then I added this code to my child theme’s functions.php file. It’s saying “if we’re trying to access the page/post with an ID of 1 (hello-world) and we don’t have the keyword thank-you (?thank-you=1) then send the user to the home page.”

    add_action( 'template_redirect', 'yikes_restrict_thank_you_pages' );
    
    function yikes_restrict_thank_you_pages() {
    	global $post;
    
    	if ( $post->ID === 1 ) {
    
    		if ( ! isset( $_GET['thank-you'] ) ) {
    
    			wp_safe_redirect( home_url() );
    			exit;
    		}
    	}
    }

    To make this work for you, you’ll need to get the ID of your thank you page and replace it with the 1 in the above example.

    Does that make sense?

    Cheers,
    Kevin.

    Note: please be careful when editing your website’s files. A mistake can temporarily break your website.

    Thread Starter Dekadinious

    (@dekadinious)

    Thank you for answering, and sorry for getting back to you so late.

    This is exactly what I want, and I am pretty sure I can set it up. I only have two questions.

    1. How do I set up destination goals in Analytics so that the “?thank-you=1” will not stop the conversion tracking? Does Analytics automatically ignore such additions to an URL?

    2. Do I need to copy and paste a separate action for each page ID, or can I somehow add multiple page ID in the same code to make it neater?

    Thank you!

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hello,

    1. I am not exactly sure how Analytics will process the ?thank-you=1 but I’m sure it will work. You might need to change some settings but these kinds of query strings are used by GA all the time (e.g. things like ?utm_source=smt which are used in URLs as variables for Google Analytics).

    2. To check for multiple IDs, you can change this line from
    if ( $post->ID === 1 ) { to if ( $post->ID === 1 || $post->ID === 101 || $post->ID === 202 ) {

    That second part says “if the ID is 1, OR if the ID is 101, OR if the ID is 202.” So feel free to add as many OR statements as you like for your different thank you page’s IDs.

    Let me know if you’d like me to look over the code before you add it to your site & as always be careful when modifying your site’s code.

    Cheers,
    Kevin.

    • This reply was modified 6 years, 7 months ago by yikesitskevin.
    Thread Starter Dekadinious

    (@dekadinious)

    Fantastic, I will create the code soon.

    One more question, though you might not know. If I A/B-test two landing pages and have ?thank-you=1 on the first and ?thank-you=2 on the second form, will I be able to have one single thank you page and track conversions from the A/B-test that way?

    This is more an Analytics specific question, but you might know.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @dekadinious,

    I am not sure whether Google Analytics would know from which form your users originally came from. However, it might be tracking the referral URL, i.e. the URL the user was previously on before getting to your thank-you page. If it does, then you should be good. Also, if you use different numbers for your thank you pages (like you described, thank-you=1, thank-you=2) then Google Analytics should be able to pick up on these. I’d test this out before trying anything special.

    If neither of the above strategies work, I’m sure we could find another solution.

    Cheers,
    Kevin.

    Thread Starter Dekadinious

    (@dekadinious)

    Hello again!

    I am going to use Google Optimize to A/B-test. Then I don’t need more thank you pages or using the URL for conversion tracking. Google Optimize does everything. Just wanted to let anyone else that might wonder know.

    For the record: I have not yet had time to implement the code, but I will ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Thank you pages’ is closed to new replies.