Using Canonical URL on Donation pages?

Options
Donation pages can be accessed by links appearing and being shared, which may include session ids, source codes, and any other added dynamic link addition. All of these tend to be picked up by search engines as separate pages, thus providing dings for duplicate content and title. Applying rel="canonical" appears to be simplisted fix for this, but I am confused as to how to apply it.


It needs to go into the <head> tag, which is located within the page wrapper and not the donation page itself. So, since all of my donation pages use the same wrapper, how can I apply the canonical URL into each different donation URL so it will work on each separate page? Any help is appreciated.
Tagged:

Comments

  • <link rel="canonical" href="[[S8]]"> , perhaps?


    That S8 tag will return whatever the URL address of the page you are viewing dynamically -- so that would solve the concern about being able to dynamically populate the value of the href for that link rel tag.


    You can put that <link> tag inside of your PageWrapper "Additional Meta Tags" section.


    p.s. on the other note, thanks for bringing us to awareness about that, I'll probably dig further about it.


    regards,

    Daniel
  • I posted this, and then left for the day, and on the way home it hit me that there was probably some way to use S tages to pull in the dontaion form ID numbers, and that it would then work. Ultimately I would need the link to be this:


    https://secure.domain.com/site/Donation2?df_id=[[STAG]]&[[STAG]].donation=form1


    I have stumbled across similar coding examples in the past, but cannot lay my hands on one now. Does anyone by chance already know the proper code and format required to produce this code?
  • I would still say you might want to use that [[S8]] approach then, because that S8 tag will return the complete URL address of the page you are on, so for example if that browser is listing the page URL as "https://secure.domain.com/site/Donation2?df_id=12345&12345.donation=form1" within its address bar, the S8 tag would return the same


    While yes, you can also opt to use [[S334:df_id]] which is basically re-reading that same URL address and find the parameter "df_id" value from that URL and re-paste the entire URL again plus the appended S334 value -- but why would you have to do the 'reconstructing' of the URL pattern where the [[S8]] tag would do just fine to do the same thing without all the added excess effort.


    Plus, the S334 approach would be less than ideal especially within CLO donation page, because you know that df_id parameter won't always be around especially post validation check when the form is refreshing itself and asking user to properly complete the missing fields, the moment it does that, you'll see that the URL becomes a 'truncated' one which is https://secure.domain.com/site/Donation2 without any of those initial parameters. Hence then you have to employ another S tag just to hold that parameter value as session variable (U0 and S80) and then not to mention the other potential flaw when end users happened to open multiple donation forms that are using the same wrapper, in that case your session variable will get overriden by whatever form opens last within that same browser in different tabs. Hence all of these unintended consequences that open up another can of worms.



  • The problem I see with replicating the complete URL, is that it defeats the purpose of the canonical tag, which is to tell it that all of the links that brought them to that page are related to that page. It sets the core page URL to be what the canonical tag states it is. So this would need to be the main, root, unchanging URL that all visitors coming to it, regardless of how they got there, will be recognized as the same page.


    So, if someone comes to the page, but their link brought them as https://secure.domain.com/site/Donation2?df_id=12345.donation=form1&12345 - where the id numbers are separated, or if they come and there is a seesion ID attached to their link, a source code, an interest code, or any number of things that coule change on the URL, the canonical link should reflect the stable, never changing URL that all of those options came to.


    That way, no matter what other info is appended to the link, when they come to the page it will tell them that the URL they came from, is related and the same as the base page of https://secure.domain.com/site/Donation2?df_id=12345&12345.donation=form1


    Unless I am totally misunderstanding the idea behind canonical links? Everything I have read points to this link being specific, non-dynamic, and the base, core URL for the page.
  • Daniel - thanks for taking the time to engage in this, I have re-read your response, and just want to make sure I totally understand and have made my understanding of the situation clear.


    Here is a real life example of what I am understanding the use of canonicals should fix. Someone can get to a single/same donation page on our site with any of these URLS:


    https://secure.ob.org/site/Donation2?idb=1308150940&df_id=8486&8486.donation=form1&mfc_pref=T

    https://secure.ob.org/site/Donation2?&df_id=8486&8486.donation=form1&s_subsrc=hompageBtn

    https://secure.ob.org/site/Donation2?8486.donation=form1&df_id=8486

    https://secure.ob.org/site/Donation2?&df_id=8486&8486.donation=form1


    Since all four URLs work, they can be treated by search engines as four separate pages - yet all with duplicat content. So, I want the engines to understand that all four are the same, not different, and that they all are canonical with


    https://secure.ob.org/site/Donation2?&df_id=8486&8486.donation=form1


    So, I believe I need to create the canonical link to be able to reflect the base URL that I want to specify as my canonical (https://secure.ob.org/site/Donation2?&df_id=8486&8486.donation=form1) so that no matter which of the 4 they use, all four will be known as canonical with the one.


    To do this, I need to put the link in and have it read what form it is on, meaning I only need to grab the form numbers and place them into my canonical link. That is why I assume I need a format like I mentioned. Now since you mention the tag that may be what I need, would this be right::


    https://secure.ob.org/site/Donation2?df_id=[[S334:df_id]]&[[S334:df_id]].donation=form1


    I assume I need to pull the number in twice, since I have seen the sets of numbers split in the link (like one of my four example mentioned above). To me, it seems if I went with you suggestion of S8 and replicating the whole URL, then I will end up with the same four unreleated links as canonical, meaning four separate yet duplicate pages:


    https://secure.ob.org/site/Donation2?idb=1308150940&df_id=8486&8486.donation=form1&mfc_pref=T

    https://secure.ob.org/site/Donation2?&df_id=8486&8486.donation=form1&s_subsrc=hompageBtn

    https://secure.ob.org/site/Donation2?8486.donation=form1&df_id=8486

    https://secure.ob.org/site/Donation2?&df_id=8486&8486.donation=form1


    Which doesn't seem to accomplish anything for avoiding duplicate content issues, unless I am confused.


  • ah I see.. and thanks for your detailed info about the canonical that helps me also understand where you are heading (sorry for the oversight of the actual canonical purpose)


    yes what you need would be that:

    <link rel="canonical" href="https://secure.domain.com/site/Donation2?df_id=[[S334:df_id]]&[[S334:df_id]].donation=form1">


    Quick preliminary thoughts / brainstorming (will update probably later, as I re-read your post and learn more about canonical)


    However we might want to tighten the control a little bit due to the mentioned behavior of CLO truncating the donation form URL of any of those parameters on form validation resubmit scenario that would possibly 'break' the above if we just simply put that like that. Thus I am thinking we might want to put mechanism to check when a donation URL form is truncated / doesn't show the df_id parameter, we might want to either exclude that canonical or modify the href value to just hold that newly parsed URL, which could be just parsed that as [[S8]]


    To make matter complicated, we are truly handicapped on the server-side programming mechanism, relying mostly on these S-tag as our make-do. Esp. for these SEO stuffs, most of it would rely on server-side implementation instead of Javascript DOM manipulation. I am going to check if there is this S-tag that would let us evaluate the URL to achieve that controlled conditional


    I am thinking something like this


    [[?x9x::x[[S4]]x::

    [[?xx::x[[S334:df_id]]x::

    <link rel="canonical" href="https://secure.domain.com/site/Donation2"> (OR BASICALLY <link rel="canonical" href="[[S8]]">)

    ::
    <link rel="canonical" href="https://secure.domain.com/site/Donation2?df_id=[[S334:df_id]]&[[S334:df_id]].donation=form1">

    ]]

    ]]


    EDIT Note: I wrapped the first conditional inside of the S4 = 9 conditional which basically means, trigger this only on Donation Page type form



    My thoughts at moment, be back


    regards,

    Daniel
  • Honestly, I am not quite sure I am following you on that additional material you discuss (CLO truncating) - or I am just not seeing the relevance to this situation. The canonical link would only apply to pages that are in someplace directly linked to, that can be reached and "read" from a direct outside source, and I cannot think of any scenario where a link to a donation page would be anything other than the similar examples I gave, none of which would be the truncated version.


    Once they land on the page, coming through any of the possible links I mentioned, they land and the canonical link says "this link they came to is related/same as XXXX (the link I created with the s-tags)" - and that ends the use or need ot the canonical link. At that point it has done it's job and told the search engine that the links are the same page.


    If they do proceed and get a validation resubmit, it shouldn't matter - the trucated URL is not a page they directly came to and whouldn't ever be "seen," crawled or indexed by the search engines anyway. They wouldn't even have access to crawl it since it is a system generasted page only available when processing a transaction - so never seen by a crawl bot. Am I wrong in my thinking here?
  • About that truncating behavior:


    Do this:
    1. Go to any one of your donation form
    2. You'll see the URL with that complete parameter (df_id etc)
    3. Now just hit donate/submit without filling up any of these
    4. The form will ask you to fill up the missing fields, and in doing so, the form page actually refreshing itself and this time observe the URL (you'll see that the URL is no longer showing that parameters).
    The problem here is that page refreshes itself, which in a way is going to be treated as new call by the browser, that would mean the page would call all the things such as dependencies, or meta, or links within the head section again under normal circumstances.

    I might be under wrong assumption about the way SEO engines retrieved / refreshes the value of that canonical, which at the moment my unassuming thought would be done upon page load, but if it's not or if it's just relying upon the bot to crawl the page... hmm I think we might not be resolving that by dynamically auto populating the DFID because those S334 tag would really relied upon when the page being hit as this is not a fully static page in which they are available out there for the bot to crawl




  • I do understand about the truncating issue you mention, but again, do not think it comes into play, because the canonical link is read when the search engine follows a link to the page, gets there, and the canonical link says "hey, the URL you came thru is the same as this one I present to you in the canonical tag."


    So unless the search engine has a way to crawl to the page thru the truncated link, the canonical link I create won't be an issue. In other words, the truncated link will never be crawled or seen by the search engine since it has no organic way to get to that truncated link on its own.
  • A couple thoughts on canonical tags:
    • They're pulled from the final rendered HTML crawled by the bot. When in doubt, go to google search console and use "fetch as google"
    • Where there's a will, a search engine will find a way to spider it. All it'd take is someone typing a malformed URL into chrome. Make sure your method is bulletproof or you'll probably do more harm than good.
    • Make sure the link doesn't 302 redirect. CLO loves 302s.
    • Go for the simplist, most human-readable version possible, since it might be visible in your SERP.
    [[S4]] would probably help, assuming you already captured the form var in the session. Could avoid a trunicated URL by setting a session var for the df_id (with a fallback in case a spider grabs a malformed link). Haven't tested it, but this might work (probably need to remove the line breaks or wrap it in a T9)...


    [[U0:dFormID=

    [[?xx::x[[S334:df_id]]x::

    [[?xx::x[[S80:dFormID]]x:: 8000 :: [[S80:dFormID]] ]]

    ::

    [[S334:df_id]]

    ]]

    ]]

    [[?x9x::x[[S4]]x::

    https://secure.ob.org/site/Donation2?df_id=[[S80:dFormID]]&[[S80:dFormID]].donation=form1

    ::

    other S4-specific URLs

    ]]


    You also might need variations based on the same form being used in different contexts (e.g. three TR events using the same base form).

Categories