Sha256: eea32a180de14f2da15086db17f42db987fa9838c8f435448764e0e3c4acc15f

Contents?: true

Size: 1.17 KB

Versions: 21

Compression:

Stored size: 1.17 KB

Contents

<% unless Rails.application.secrets.widget_api_key.nil? %>
    <script  defer>
        <% if current_user.present? %>
            window.NeetoWidgetUserIdentity = {
                email: "<%= current_user.email %>"
            }
            window.NeetoReplayWidgetSessionContext = {
                user_id: "<%= current_user.id %>",
                sign_in_count: "<%= current_user.sign_in_count %>",
                name: ["<%= current_user.first_name %>", "<%= current_user.last_name %>"]
            }
        <% end %>

        function handleWidgetScriptOnLoad() {
            window.NeetoChat = {
                visibleOnMount: false,
                triggerAction: "hide"
            }
            embedNeetoWidget({
                environment: "<%= NeetoCommonsBackend::Helpers.get_neeto_widget_environment %>",
                apiKey: "<%= Rails.application.secrets.widget_api_key %>",
                neetoChangelogOptions: {
                    elementId: "neetochangelog-trigger",
                },
            });
        }
    </script>

    <script src="<%= NeetoCommonsBackend::Helpers.build_neeto_widget_script_url %>" onload="handleWidgetScriptOnLoad()"></script>
<% end %>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.89 app/views/shared/_neeto_widget.html.erb