Sha256: b19c979d6b99fb2937797d7101b721a4f6893420c0364979c351505fd32e6e5a

Contents?: true

Size: 513 Bytes

Versions: 6

Compression:

Stored size: 513 Bytes

Contents

require 'support/capybara_app_helper'

RSpec.describe "Google Tag Manager Integration" do
  before do
    setup_app(action: :google_tag_manager) do |tracker|
      tracker.handler :google_tag_manager, { container: 'GTM-ABCDEF' }
    end
    visit '/'
  end

  subject { page }

  it "embeds the script tag with tracking event from the controller action" do
    expect(page.find("body")).to have_content('GTM-ABCDEF')
    expect(page.find("body")).to have_content('\'click\': \'X\', \'price\': \'10\'')
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rack-tracker-1.0.2 spec/integration/google_tag_manager_integration_spec.rb
rack-tracker-1.0.1 spec/integration/google_tag_manager_integration_spec.rb
rack-tracker-1.0.0 spec/integration/google_tag_manager_integration_spec.rb
rack-tracker-0.4.2 spec/integration/google_tag_manager_integration_spec.rb
rack-tracker-0.4.1 spec/integration/google_tag_manager_integration_spec.rb
rack-tracker-0.4.0 spec/integration/google_tag_manager_integration_spec.rb