Embed code widget

You use the Embed code widget to write CSS, JavaScript, or paste other types of code, for example, Google Analytics code. You include this code on the page by placing the Embed code widget. For more information about Google Analytics, see:

NOTE: When using the Embed code widget, the code is always placed inside the <body> section of the page HTML. If you need to have the tracking code placed inside the <head> tag of the page HTML you must use a JavaScript widget and add the code manually. For more information see JavaScript widget | MVC.


To configure the Embed code widget:

  1. Place the widget on your page and click the Edit button in the upper-right corner of the widget.
    The Embed code window is displayed.
  2. Depending on the type of code you want to embed, paste the Google Analytics tracking code or enter JavaScript or CSS code in the text box.
  3. To optionally add a description for the code, expand the More options section.
    This description is displayed only when pages are in edit mode for your convenience.
  4. When you are finished, click Save.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?