Sha256: 20790291629a1eae01b41efdf62b68279b21a0cc88bdad2c29afe5b789bf953b

Contents?: true

Size: 1.39 KB

Versions: 21

Compression:

Stored size: 1.39 KB

Contents

<% unless Rails.application.secrets.neeto_engineering_widget_api_key.nil? %>
    <script  defer>
        // this script will just load neeto-replay-widget to upload all the recordings
        // of neeto products under neeto-engineering organization of neetoreplay
        // staging: neeto-engineering.neetoreplay.net
        // production: neeto-engineering.neetoreplay.com

        <% 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 handleEngineeringReplayWidgetScriptOnLoad() {
            embedNeetoWidget({
                environment: "<%= NeetoCommonsBackend::Helpers.get_neeto_widget_environment %>",
                apiKey: "<%= Rails.application.secrets.neeto_engineering_widget_api_key %>",
                neetoChangelogOptions: {
                    elementId: "neetochangelog-trigger",
                },
            });
        }
    </script>

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

Version data entries

21 entries across 21 versions & 1 rubygems

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