Skip to main content

Reference

Widget Attributes

AttributeDescriptionExampleAvailable For
pg-amplify-widget-idRequired. The unique application/widget ID that links to your specific configuration."my-clinic-widget-123"All widgets
pg-amplify-person-idRequired (if no location ID). The unique identifier for a specific provider/person to load their reviews."12341223234"All widgets
pg-amplify-person-nameOptional. Added by the Amplify admin UI for easier identification of generated snippets. No functional impact."Dr Manhattan"All widgets
pg-amplify-location-idRequired (if no person ID). The unique identifier for a specific location/facility to load its reviews."downtown-clinic-hq"All widgets
pg-amplify-location-nameOptional. Added by the Amplify admin UI for easier identification of generated snippets. No functional impact."some location"All widgets
pg-amplify-detail-urlOptional. A URL to redirect users to a detailed review page when they interact with the summary widget. See Navigation & Routing."/reviews/dr-john-smith"Summary widget
data-schema-idOptional. The @id URI matching your existing Schema.org entity, used for SEO/JSON-LD integration. See SEO Schema Markup."https://example.com/dr-smith/#physician"All widgets
data-schema-typeOptional. The Schema.org @type of the entity for SEO rich snippets. Required if using data-schema-id. See SEO Schema Markup."Physician", "LocalBusiness"All widgets
data-config-overrideOptional. A JSON string to override specific widget configurations locally. See Configuration Overrides.'{"options":{"showAISummary":false}}'All widgets
idOptional. Standard HTML id for the container. Useful for anchor-linking directly to the review section."patientReviews"All widgets

Events

Event NameDescriptionDetail Properties
widget-navigateFired when navigation is requested (e.g., user clicks from summary to detail).section, target
widget-errorFired when an error occurs during widget loading or rendering.code, message, widgetType
widget-loadedFired when widget data is successfully loaded and rendered.widgetType, data

Error States & Console Messages

Error / WarningCauseSolution
console.error("appId and providerId/siteId are required")The widget was mounted without the required identifying attributes.Ensure the HTML element includes both pg-amplify-widget-id and either pg-amplify-person-id or pg-amplify-location-id.
console.error("Amplify Widget: providerid or locationid is required")Same as above — missing entity identifier.Add pg-amplify-person-id or pg-amplify-location-id to the widget element.
console.error("Amplify Detail/Summary Widget: appid and entityid are required")Same as above — missing both widget ID and entity ID.Add both pg-amplify-widget-id and an entity ID attribute.
console.error("No data found!")The widget connected to the API but no configuration or review data was returned for the provided IDs.Verify that the widget ID, person ID, and location ID are correct and that the entity has reviews in the system.
console.warn("The total ratings count does not meet the minimum threshold requirement. Present rating count is [X].")The entity does not have enough reviews to meet the minimum display threshold.No action required. The widget hides itself automatically and will display once the entity receives more reviews.
console.warn("Amplify Widget: No valid config found")The CDN script found a widget placeholder class but could not parse the required configuration from its attributes.Check the HTML formatting on the placeholder <div>. Ensure attributes are spelled correctly and any JSON strings are valid.
console.error("Config fetch error: [Error details]") / console.error("Data fetch error: [Error details]") / console.error("Fetch error: [Error details]")A network issue occurred while downloading configuration or review data (e.g., CORS error, offline status, server downtime).Contact Press Ganey support.
console.warn("Amplify Security: Invalid section parameter: [section]")An unrecognized URL parameter was passed for the section tab during cross-page navigation.Ensure you are not manually altering the query strings or localStorage navigation state created by the widgets.
console.error("Amplify Security: Cross-origin navigation blocked to/from [Origin]")A cross-domain navigation was attempted but the origin is not whitelisted.Add the origin domain to the allowedOrigins list in the widget's configuration. See Navigation & Routing.
console.error("Amplify Security: Invalid detail-url: [URL]")The URL in pg-amplify-detail-url is malformed or cannot be parsed.Ensure the URL is valid (e.g., /reviews/dr-smith or https://clinic.com/reviews).