Sha256: 1695a15a50b723333f8c059d1348a8f115e162a94d3373c6bcaed4573cdf37a5

Contents?: true

Size: 771 Bytes

Versions: 23

Compression:

Stored size: 771 Bytes

Contents

require 'support/capybara_app_helper'

RSpec.describe "Google Adwords Conversion Integration" do
  before do
    setup_app(action: :google_adwords_conversion) do |tracker|
      tracker.handler :google_adwords_conversion
    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("var google_conversion_id = 123456;\nvar google_conversion_language = 'en';\nvar google_conversion_format = '3';\nvar google_conversion_color = 'ffffff';\nvar google_conversion_label = 'Conversion Label';")
    expect(page.find("body")).to have_xpath("//img[@src=\"//www.googleadservices.com/pagead/conversion/123456/?label=Conversion%20Label&guid=ON&script=0\"]")
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rack-tracker-1.13.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.12.1 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.12.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.11.2 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.11.1 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.11.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.10.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.9.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.8.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.7.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.6.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.5.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.4.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.3.1 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.3.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.2.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.1.0 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.0.2 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.0.1 spec/integration/google_adwords_conversion_integration_spec.rb
rack-tracker-1.0.0 spec/integration/google_adwords_conversion_integration_spec.rb