Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

2.7 KB
Raw Blame
@{
    Layout = "_AdminLayout";
    ViewBag.Title = Loc["Widgets.FacebookPixel.FriendlyName"];
}
@model Widgets.FacebookPixel.Models.ConfigurationModel
@* the setup steps stay a note; the pixel and its scripts in one card, the cookie consent in
   another; Save as the one primary action instead of the _ConfigurePlugin chrome *@
<form asp-controller="WidgetsFacebookPixel" asp-action="Configure" method="post">
    <admin-page title="@Loc["Widgets.FacebookPixel.FriendlyName"]" icon="bi-facebook">
        <page-actions>
            <button type="submit" name="save" class="btn btn-primary">
                <i class="bi bi-check-lg"></i> @Loc["Admin.Common.Save"]
            </button>
        </page-actions>

        @await Component.InvokeAsync("StoreScope")

        <div class="note note-info">
            <p>
                Please note that Purchase and Add to cart events work only when you have \"Disable order completed page\" order setting unticked and \"Display cart after adding product\" shopping cart setting ticked.
            </p>
            <ul>
                <li>1. Go to <a href="https://business.facebook.com/ads/manager/pixel/facebook_pixel">Facebook Pixel configuration page</a>.</li>
                <li>2. Provide the name of the pixel and optionally URL of the store</li>
                <li>3. Navigate to the Settings tab and copy "Pixel ID" field.</li>
                <li>4. Paste it to the PixelId field and save changes.</li>
            </ul>
        </div>
        <admin-card>
            <div class="grand-fields">
                <admin-field asp-for="PixelId" size="lg"/>
                <admin-field asp-for="PixelScript">
                    <admin-textarea asp-for="PixelScript"></admin-textarea>
                </admin-field>
                <admin-field asp-for="AddToCartScript">
                    <admin-textarea asp-for="AddToCartScript"></admin-textarea>
                </admin-field>
                <admin-field asp-for="DetailsOrderScript">
                    <admin-textarea asp-for="DetailsOrderScript"></admin-textarea>
                </admin-field>
            </div>
        </admin-card>
        <admin-card>
            <div class="grand-fields grand-fields--2col">
                <admin-field asp-for="AllowToDisableConsentCookie"/>
                <admin-field asp-for="ConsentDefaultState"/>
                <admin-field asp-for="ConsentName">
                    <admin-textarea asp-for="ConsentName"></admin-textarea>
                </admin-field>
                <admin-field asp-for="ConsentDescription">
                    <admin-textarea asp-for="ConsentDescription"></admin-textarea>
                </admin-field>
            </div>
        </admin-card>
    </admin-page>
</form>