Skip to content

Commit

Permalink
Remove GTM, GA, and the cookie banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitemaeric committed Jan 8, 2025
1 parent 3165590 commit 77fca36
Show file tree
Hide file tree
Showing 31 changed files with 56 additions and 809 deletions.
5 changes: 0 additions & 5 deletions app/assets/stylesheets/components/publish/_cookie_banner.scss

This file was deleted.

6 changes: 3 additions & 3 deletions app/assets/stylesheets/publish_application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
@import "components/shared/phase-banner";
@import "components/shared/accordion";


@import "components/publish/card";
@import "components/publish/cookie_banner";
@import "components/publish/description-list";
@import "components/publish/inset-text";
@import "components/publish/link";
Expand Down Expand Up @@ -45,7 +43,9 @@

// This ensures govuk-button-to form wrapper is aligned within button groups properly
.govuk-button-group {
form { display: contents; }
form {
display: contents;
}
}

.govuk-tag-no-max-width {
Expand Down
20 changes: 0 additions & 20 deletions app/controllers/cookie_preferences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,4 @@

class CookiePreferencesController < ApplicationController
skip_before_action :authenticate

def show
@cookie_preferences_form = Publish::CookiePreferencesForm.new(cookies)
end

def update
@cookie_preferences_form = Publish::CookiePreferencesForm.new(cookies, cookie_preferences_params)

if @cookie_preferences_form.save
redirect_back(fallback_location: root_path, flash: { success: 'Your cookie preferences have been updated' })
else
render(:show)
end
end

private

def cookie_preferences_params
params.require(:publish_cookie_preferences_form).permit(:analytics_consent)
end
end
19 changes: 0 additions & 19 deletions app/controllers/find/cookie_preferences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,5 @@

module Find
class CookiePreferencesController < ApplicationController
def show
@cookie_preferences_form = CookiePreferencesForm.new(cookies)
end

def update
@cookie_preferences_form = CookiePreferencesForm.new(cookies, cookie_preferences_params)

if @cookie_preferences_form.save
redirect_back(fallback_location: root_path, flash: { success: I18n.t('cookies.preferences.success') })
else
render(:show)
end
end

private

def cookie_preferences_params
params.require(:find_cookie_preferences_form).permit(:analytics_consent)
end
end
end
26 changes: 0 additions & 26 deletions app/forms/find/cookie_preferences_form.rb

This file was deleted.

26 changes: 0 additions & 26 deletions app/forms/publish/cookie_preferences_form.rb

This file was deleted.

15 changes: 0 additions & 15 deletions app/helpers/cookies_helper.rb

This file was deleted.

83 changes: 0 additions & 83 deletions app/javascript/cookie_banner.js

This file was deleted.

75 changes: 0 additions & 75 deletions app/javascript/cookie_banner.spec.js

This file was deleted.

3 changes: 0 additions & 3 deletions app/javascript/find/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { initAll } from 'govuk-frontend'
import { FilterToggleButton } from './filter-toggle-button'
import initAutocomplete from './autocomplete'
import dfeAutocomplete from './dfe-autocomplete'
import CookieBanner from '../cookie_banner'

import { Application } from '@hotwired/stimulus'
import FilterSearchController from './controllers/filter_search_controller'
Expand All @@ -21,8 +20,6 @@ initAll()

dfeAutocomplete({ rawAttribute: false, confirmOnBlur: false })

CookieBanner.init()

initAutocomplete({
element: 'location-autocomplete',
input: 'location',
Expand Down
10 changes: 0 additions & 10 deletions app/javascript/jestGlobalMocks.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/javascript/publish/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import { initAll } from 'govuk-frontend'
import autocompleteSetup from './autocomplete'
import initLocationsMap from './locations-map'
import FilterToggle from './filters'
import CookieBanner from '../cookie_banner'

window.jQuery = jQuery
window.$ = jQuery
window.initLocationsMap = initLocationsMap

initAll()
FilterToggle.init()
CookieBanner.init()

autocompleteSetup()
Loading

0 comments on commit 77fca36

Please sign in to comment.