Uniform for Sitecore Documentation

website·Indexed 35 days ago

https://docs.uniform.dev/sitecore/

Documentation for Uniform for Sitecore, focusing on Uniform Optimize and Uniform Deploy. It covers edge-side personalization, visitor activity tracking, CDN configurations (including Akamai), incremental content sync via Azure Blob Storage, and deployment to platforms like Cloudflare Workers.

Tokens
78.8K
Snippets
271
Records
559
Agent score
63%

What's inside Uniform for Sitecore

  1. Overview of Uniform for Sitecore Media Sync

    The Media Sync capability decouples the storage and serving of Sitecore Media Library items from a Sitecore Content Delivery server. When activated, it deploys media items from a configured Media Scope to a target blob storage container (such as Azure Blob Storage or Tencent Cloud Object Storage).

    Media Sync is triggered in two ways:

    1. Via the GUI during Initial Content Sync.
    2. Immediately after publishing (this blocks the publishing thread) before the site deployment action is invoked.
  2. Overview of the getDependentPages pipeline

    The getDependentPages pipeline is used by Uniform for Sitecore to power Incremental Static Site Generation (ISSG) and Incremental Content Sync. Its purpose is to identify all page-level items that are dependent on a specific changed content item (the Evaluated Item) and are within the scope of the current Site Configuration.

    There are two ways to define this pipeline in Sitecore configuration:

    • Global: sitecore/pipelines/group[@name="uniform"]/pipelines/getDependentPages (Default).
    • Site-specific: sitecore/uniform/siteConfigurations/siteConfiguration[@name='mysite']/pipelines/getDependentPages (Used when dependency resolution varies by site).
  3. Overview of Uniform Site Configurations

    A Site Configuration is an entity in the Uniform Connector that encompasses all site-level settings and extends the Sitecore "site" concept. A valid Site Configuration is required to activate Uniform APIs, as all content APIs are scoped to a specific configuration. You can create multiple Site Configurations for a single Sitecore site definition to override settings for different languages, target databases (e.g., pre-production), or deployment and sync settings.
  4. Overview of Uniform deployment to AWS S3

    Uniform allows Sitecore content to be deployed to AWS S3 buckets. The available functionality includes publishing pages, publishing media files, and purging the cache on a CloudFront distribution. These features can be used independently; for example, you can publish media files to S3 without publishing pages.
  5. Overview of Uniform Optimize and Google Analytics UA Integration

    Uniform Optimize provides a client-side tracker that collects visit activity and stores it in the browser. This tracker can dispatch data to external systems, such as Google Analytics Universal Analytics (UA), as non-interaction events.

    Critical Requirement: Because Uniform sends data as non-interaction events, the Google Analytics global site tag must be installed on your site first to ensure visitors are recognized as active users.

    Note: Universal Analytics is deprecated (as of July 1, 2023). For newer projects, use Google Analytics 4.

  6. Overview of Uniform for Sitecore capabilities

    Uniform for Sitecore allows Sitecore customers to achieve modern web performance, scalability, cost, and security benefits without performing expensive or risky version upgrades. It provides two primary capabilities that can be used independently or in combination: Deploy and Optimize.
  7. Overview of Incremental Static Site Generation (ISSG) for Sitecore

    Incremental Static Site Generation (ISSG) in Uniform for Sitecore allows the system to regenerate only the specific pages affected by CMS content changes. This avoids the expensive process of a full site re-generation during every publish event. Unlike Next.js's Incremental Static Regeneration (ISR), which uses a 'stale-while-revalidate' caching strategy on Node servers, Uniform's ISSG triggers regeneration only when content actually changes and does not require special server-side cache management infrastructure.
  8. Use the getPersonalizedRenderings pipeline to resolve personalized renderings

    The getPersonalizedRenderings pipeline determines which personalized renderings are associated with a specific Sitecore item. Custom processors for this pipeline should inherit from the Uniform.Pipelines.GetPersonalizedRenderings.GetPersonalizedRenderingsProcessor base type.
    // Base type for custom processors
    Uniform.Pipelines.GetPersonalizedRenderings.GetPersonalizedRenderingsProcessor
  9. Configure multilingual sites using Multi-site architecture (Netlify/Vercel)

    The Multi-site architecture is recommended for Jamstack-native platforms like Netlify and Vercel. It uses a dedicated site per language and a single proxy site that routes requests based on the path to the appropriate language site.
    # Netlify rewrite rules example
    /fr/*               https://habitat-fr.netlify.app/:splat 200
    /en/*               https://habitat-en.netlify.app/:splat 200
    
    # General pseudo-code for other CDNs
    https://www.site.com/(lang)/* => https://(lang).site.com/(lang)/$(1)
  10. Prerequisites for Jamstackifying a Sitecore MVC site

    Before starting the migration to a Jamstack architecture with Next.js, ensure the following requirements are met:

    1. Sitecore instance version 8.2 Update-7 or higher.
    2. Uniform Connector package installed and configured.
    3. Sufficient permissions to install Sitecore packages and deploy configuration files to the webroot.
    4. The Uniform.API.Token value from the Uniform Connector configuration.
    5. Node.js v.12 or higher and npm installed.
    6. An npm access token provided by a Uniform account representative.
    7. Git installed for cloning the starter repository.