Opt-In pages are individual global landing pages that a business can selectively choose to display per individual business, site, or location.
This is usually accomplished via changes in the DevHub builder as well as via an Excel sheet integration. If you do not currently use a Google Sheet for configuration, OR your sheet is managed via an API connection, please reach out to your DevHub contacts for assistance.
Setting up the Sheet
1. Open your primary Excel document (typically hosted on Google Sheets). Make sure you are in the "Production Data" tab.
2. Create a new Column for your opt-in page. Name this column however you like, keeping in mind you will use this name later, so it should be recognizable. We recommend using the same name as the template page.
For example, if I were creating a global template page for my businesses called, "Resources Page", I would call the sheet column "Has Resources Page" or "Resources Page Opt-In".
3. For every site/location that you want to have this page type, write "yes" in that corresponding column and row. It might look something like this:
Setting up Page Options in the Builder
1. After you're done setting up the Sheet, open the DevHub builder.
2. Navigate to the site/business/location you want to manage - this will be wherever the custom template page you've created is located, and could differ depending on your unique setup. In most cases, this will be where the majority of your global pages are located. If you have not yet created this new page, do so now.
3. Once you are on the page, go to Page > Page Options. Scroll down, and open the Advanced section.
4. You will see a field called "Published status from custom field". Here, you will put the name of the column from your sheet, as a slug version. Slug version means that any spaces are replaced with an underscore, and all letters should be lowercase.
In the above example, we made our column in the sheet "Has Resources Page", so the slug would be "has_resources_page".
5. Be sure to hit save at the bottom of this window.
Managing Canonical URLs
If multiple versions of the same content page exist on your site in different templates (for instance, if your site has a Corporate template and a Local Page template), and the local version of that page is set to opt-in, then you will need to make sure to update the canonical URLs for SEO.
What Is a Canonical URL?
A canonical URL is the version of a webpage chosen by search engines like Google as the main version when there are duplicates. This selected URL is prioritized to avoid showing repetitive content that does not provide unique value in search results.
Example:
- Corporate page version: https://www.brand.com/services/service-name/
- Opt-in Local page version: https://www.brand.com/seattle/services/service-name/
Google will likely choose the canonical URL for indexing and ranking. The canonical page is also called the “principal,” “primary,” or “representative” version. Google doesn’t always make the decision you want; however, you can influence canonicalization by using this method.
Steps:
1. To set the canonical, first navigate to the local page template. Make sure to select the opt-in page you created.
2. From the page in the builder, go to Page > Page Options > Advanced, and scroll down until you get to "Canonical URL".
3. Enter the Corporate version of this URL (seen in the above example).
4. Be sure to save.
Redirects
If the local version is opt-in, we also need to set up a redirect, for any site's local content that has opt-ed out of that page.
1. Within the Local site parent template, go to Site > Settings > Full path redirects
2. Create a new redirect by clicking Add, then entering the data following the below template example:
- From: /services/service-name/
- To: https://www.brand.com/services/service-name/
- Status: 301
3. Remember to Save.
Please Note: The "To:" field needs to be the full URL of the corporate page, domain included. In this setup, if the local site has not opt-ed in to the page, instead of a 404 it will instead redirect to the corporate version.