--- --- customer-account.profile.block.renderSkip to main content

customer-account.profile.block.render

A block extension target that renders exclusively on the Profile page in customer accounts. This extension target renders for all customers, including B2B customers. Merchants can choose to place this extension in any of the supported locations. To preview your extension in each supported location, use the placement reference for that location as a URL parameter.

Support
Components (7)
APIs (0)

The base API object provided to this and other customer-account extension targets.

Anchor to analytics
analytics
required

Methods for interacting with Web Pixels, such as emitting an event.

Note

Requires to connect a third-party domain to Shopify for your customer account pages.

Anchor to applyTrackingConsentChange
applyTrackingConsentChange
required

Allows setting and updating customer privacy consent settings and tracking consent metafields.

Note

Requires the customer_privacy capability to be set to true.

Requires access to protected customer data.

Anchor to authenticatedAccount
authenticatedAccount
required

Information about the authenticated account.

Anchor to customerPrivacy
customerPrivacy
<>
required

Customer privacy consent settings and a flag denoting if consent has previously been collected.

Anchor to extension
extension
required

Meta information about the extension.

required

Utilities for translating content and formatting values according to the current localization of the user.

Anchor to intents
intents
required

Entry point for Shopify intents.

Intents pair an action (verb) with a resource type and optional value and data to request a workflow.

Anchor to localization
localization
required

Details about the language of the buyer.

Anchor to query
query
<Data = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: ; }) => Promise<{ data?: Data; errors?: []; }>
required

Used to query the Storefront GraphQL API with a prefetched token.

See storefront api access examples for more information.

Anchor to sessionToken
sessionToken
required

Provides access to session tokens, which can be used to verify token claims on your app's server.

See session token examples for more information.

Anchor to settings
settings
<>
required

The settings matching the settings definition written in the shopify.ui.extension.toml file.

See settings examples for more information.

Note

When an extension is being installed in the editor, the settings will be empty until a merchant sets a value. In that case, this object will be updated in real time as a merchant fills in the settings.

Anchor to storage
storage
required

Key-value storage for the extension target.

Anchor to toast
toast
required

The Toast API displays a non-disruptive message that displays at the bottom of the interface to provide quick, at-a-glance feedback on the outcome of an action.

How to use:

  • Use toasts to confirm successful actions.

  • Aim for two words.

  • Use noun + past tense verb format. For example, `Changes saved`.

For errors, or information that needs to persist on the page, use a banner component.

Anchor to version
version
Version
required

The renderer version being used for the extension.

Anchor to extensionPoint
extensionPoint
Target
required

The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file.

Deprecated

Deprecated as of version 2023-07, use extension.target instead.

Examples
import '@shopify/ui-extensions/preact';
import {render} from 'preact';

export default async () => {
render(<Extension />, document.body);
};

function Extension() {
return (
<s-text>I am a Profile extension</s-text>
);
}
Was this page helpful?