DirkPersky / typo3-dp_cookieconsent

TYPO3 Extension: Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)
GNU Affero General Public License v3.0
32 stars 26 forks source link

Position in source code #63

Closed rteinze closed 3 years ago

rteinze commented 3 years ago

Please add an option to decide to include the source code either at top or at the bottom of the area.

There are issues in Google results with the texts and labels from the extension. Please look at the screenshot.

Screenshot 2021-01-14 114245

Thanks a lot for your nice extension.

riegeo commented 3 years ago

We have the same issue. This especially happens if there is no description (or empty) tag. Thank you

Meanwhile we have moved it to the bottom with this typoscript

page {
  headerData.998 >
  headerData.657 >
  footerData {
      998 = COA
      998 {
          # Modify Google Tag-Manager & Piwiki from CS_SEO
          10 = COA
          10 {
              wrap = <script data-ignore="1" data-cookieconsent="statistics" type="text/plain">|</script>
              required = 1
              10 < page.jsInline.654
          }
          # Add Consent Config to Script
          20 < lib.dp_cookieconsent
      }

      # cs_seo hook
      657 {
          # Modify Google Analytics from CS_SEO
          10 {
              stdWrap.replacement  {
                  10 {
                      search = <script
                      replace = <script data-ignore="1" data-cookieconsent="statistics" type="text/plain"
                  }
                  20 {
                      search = src=
                      replace = data-src=
                  }
              }
          }
          # Modify Google Analytics from CS_SEO
          20 {
              stdWrap.replacement  {
                  10 {
                      search = <script
                      replace = <script data-ignore="1" data-cookieconsent="statistics" type="text/plain"
                  }
              }
          }
      }
  }
}