Skip to content

Commit

Permalink
docs: add analytics (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux authored Dec 7, 2023
1 parent f98c77b commit 4f50607
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 87 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy-pages-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Deploy to GitHub Pages (DEV Version)

on:
workflow_dispatch:
# schedule:
# - cron: '0 6 * * 1-4'

permissions:
contents: write
Expand Down
180 changes: 96 additions & 84 deletions packages/documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,101 @@ const customCss = [

const baseUrl = process.env.BASE_URL || '/';

/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
const themeConfig =
{
metadata: [
{
name: 'keywords',
content:
'siemens-ix, ix, stenciljs, angular, webcomponent, react, siemens, ix, siemens, industrial, experience, vue',
},
{
name: 'description',
content:
'Siemens Industrial Experience is an open-source design system for designers and developers to consistently create the perfect digital experience for partners and customers',
},
],
colorMode: {
disableSwitch: true,
},
navbar: {
title: 'Siemens Industrial Experience',
logo: {
alt: 'Siemens AG',
src: 'img/logo.svg',
},
items: [
],
},
footer: {
copyright: `© Siemens 1996 - ${new Date().getFullYear()}`,
links: [
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/siemens/ix',
},
{
label: 'iX Community',
href: 'https://community.siemens.com/c/ix',
},
{
label: 'Siemens Developer Portal',
href: 'https://developer.siemens.com',
},
],
},
{
title: 'About',
items: [
{
label: 'Corporate Information',
href: 'https://www.siemens.com/corporate-information',
},
{
label: 'Privacy Notice',
href: 'https://www.siemens.com/privacy-notice',
},
{
label: 'Cookie notice',
href: '/cookie-notice',
},
{
html: '<a class="footer__link-item" href="javascript:void(0)" onClick="UC_UI.showSecondLayer();">Privacy Settings</a>',
},
{
label: 'Terms of use',
href: 'https://www.siemens.com/terms-of-use',
},
{
label: 'Digital ID',
href: 'https://www.siemens.com/digital-id',
},
],
},
],
},
prism: {
// @ts-ignore
theme: require('prism-react-renderer/themes/dracula'),
theme2: require('prism-react-renderer/themes/dracula'),
},
};

if (baseUrl !== '/') {
themeConfig.announcementBar = {
id: 'dev_env',
content:
'You are looking at our development environment, please go to our <a target="_blank" rel="noopener noreferrer" href="https://ix.siemens.io">production page</a>.',
backgroundColor: '#fafbfc',
textColor: '#091E42',
isCloseable: false,
};
}

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Siemens Industrial Experience',
Expand Down Expand Up @@ -85,90 +180,7 @@ const config = {
customFields: {
withBrandTheme,
},
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
metadata: [
{
name: 'keywords',
content:
'siemens-ix, ix, stenciljs, angular, webcomponent, react, siemens, ix, siemens, industrial, experience, vue',
},
{
name: 'description',
content:
'Siemens Industrial Experience is an open-source design system for designers and developers to consistently create the perfect digital experience for partners and customers',
},
],
colorMode: {
disableSwitch: true,
},
navbar: {
title: 'Siemens Industrial Experience',
logo: {
alt: 'Siemens AG',
src: 'img/logo.svg',
},
items: [
// Remove docs version until library needs to publish an major release
// {
// type: 'docsVersionDropdown',
// position: 'right',
// },
],
},
footer: {
copyright: `© Siemens 1996 - ${new Date().getFullYear()}`,
links: [
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/siemens/ix',
},
{
label: 'iX Community',
href: 'https://community.siemens.com/c/ix',
},
{
label: 'Siemens Developer Portal',
href: 'https://developer.siemens.com',
},
],
},
{
title: 'About',
items: [
{
label: 'Corporate Information',
href: 'https://www.siemens.com/corporate-information',
},
{
label: 'Privacy Notice',
href: 'https://www.siemens.com/privacy-notice',
},
{
label: 'Cookie notice',
href: 'https://www.siemens.com/cookie-notice',
},
{
label: 'Terms of use',
href: 'https://www.siemens.com/terms-of-use',
},
{
label: 'Digital ID',
href: 'https://www.siemens.com/digital-id',
},
],
},
],
},
prism: {
theme: require('prism-react-renderer/themes/dracula'),
theme2: require('prism-react-renderer/themes/dracula'),
},
},
themeConfig: themeConfig,
plugins: [
'docusaurus-plugin-sass',
[
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"docusaurus": "docusaurus",
"start": "npm run generate-markdown && docusaurus start",
"start": "npm run generate-markdown && docusaurus start -h 127.0.0.1",
"build": "npm run generate-markdown && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand Down
36 changes: 36 additions & 0 deletions packages/documentation/src/pages/cookie-notice/_notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Status: December 2023

This Cookie Notice applies to the websites accessible under “ix.siemens.io” (the “website”).

This website uses cookies. Cookies are small files containing certain information that are stored on your device. Cookies are served either by Siemens AG or Siemens Industry Software, Inc. (collectively “Siemens”) – so-called “first party cookies” – or by third parties providing services to Siemens; such cookies are referred to as “third party cookies”.

Cookies are necessary to provide certain functionalities on a website, e.g. to maintain a language choice made by a user. Moreover, cookies enable the respective issuer (Siemens or a third party) to recognize that the website was previously called up by a certain end device, allowing the identification of returning visitors (or rather their end devices) and gathering information about their usage of the website and their presumed interests.

This information is used to improve the website and to deliver relevant advertisement for Siemens Industrial Experience products and services on the website as well as on third party sites.

Cookies can be assigned to four categories, depending on their function and intended purpose: strictly necessary cookies, performance cookies, functionality cookies, and marketing cookies.

# Strictly Necessary Cookies
These cookies are essential in order to enable you to move around the website and use its features, such as setting your privacy preferences, logging in or filling in forms. Without these cookies, services requested through usage of our website cannot be properly provided.

Strictly necessary cookies do not require consent from the user under applicable law. You may configure your web browser to block strictly necessary cookies, but you might then not be able to use the website’s functionalities as intended.

To the extent that information processed in connection with strictly necessary cookies should qualify as personal data in a given case, the legal ground for that processing is Siemens Industrial Experience’s legitimate interest to operate the website.

# Performance Cookies
These cookies collect information about how visitors use a website, for instance which pages visitors go to most often, and how visitors move around the site. They help us to better understand a user’s behavior on our webpage. This is necessary to improve the user friendliness of a website and therefore enhance the user’s experience.

Further information collected by performance cookies may include e.g.: internet browser and operating system used, the domain name of the website which you previously visited, the number of visits, average duration of visit, and pages called up.

In general, the information collected by these cookies is aggregated and can normally not be linked to a specific natural person. However, in certain cases the collected information can be linked to you directly (provided you disclosed your identity to Siemens Industrial Experience, e.g., when creating an account or filing a request with us). To the extent that information processed in connection with performance cookies can, in a given case, be directly linked to you or otherwise qualifies as personal data, the legal ground for that processing is your user consent.

# Functionality Cookies
These cookies allow the website to remember choices you make or information you enter (such as your username, language or the region you are in) and provide enhanced, more personal features. They are also used to enable requested functions such as playing videos.
To the extent that information processed in connection with functionality cookies should, in a given case, qualify as personal data, the legal ground for that processing is the user’s consent.

# Marketing Cookies
Marketing cookies (also referred to as targeting or advertising cookies) are used to deliver adverts on third party websites more relevant to you and your interests. They are also used to limit the number of times you see an advertisement as well as help measure the effectiveness of an advertising campaign.

Legal basis for the processing of personal data in connection with marketing cookies (if any) is the user’s consent.

In case of any request in connection with this Cookie Notice, please contact the Data Privacy Organization at [email protected]
68 changes: 68 additions & 0 deletions packages/documentation/src/pages/cookie-notice/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* SPDX-FileCopyrightText: 2023 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { IxButton } from '@siemens/ix-react';
import Layout from '@theme/Layout';
import React, { useEffect, useLayoutEffect } from 'react';
import './uc.css';
import Notice from './_notice.md';

const CookieNotice: React.FC = () => {
useEffect(() => {
(window as any).UC_UI_SUPPRESS_CMP_DISPLAY = true;
}, []);

useLayoutEffect(() => {
const UC_UI = (window as any).UC_UI;

if (UC_UI && typeof UC_UI.restartEmbeddings === 'function') {
UC_UI.restartEmbeddings();
}
}, []);

return (
<>
<Layout title="Cookie Notice" description="Hello React Page">
<div
style={{
padding: '0 4rem',
}}
>
<h1>
Siemens
<br />
Industrial Experience
</h1>

<h1>Cookie Notice</h1>
<div>
<IxButton
onClick={() => {
(window as any).UC_UI.showSecondLayer();
}}
style={{
margin: '1rem 2rem 2rem 0',
}}
>
Manage preferences
</IxButton>
<Notice />
<div
className="uc-embed"
uc-data="all"
uc-embedding-type="category"
uc-styling="true"
></div>
</div>
</div>
</Layout>
</>
);
};

export default CookieNotice;
27 changes: 27 additions & 0 deletions packages/documentation/src/pages/cookie-notice/uc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* SPDX-FileCopyrightText: 2023 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
.uc-embed .uc-embed-container {
background-color: var(--theme-color-0) !important;
}

.uc-embed .uc-embed-list-item,.uc-embed-list-headline-description {
border: none !important;
}

.uc-embed .uc-embed-opened-link,.uc-embed-collapsed-link {
background-color: transparent !important;
}

.uc-embed .uc-embed-opened-button, .uc-embed-collapsed-button {
background-color: var(--theme-color-3) !important;
}

.uc-embed .uc-embed-opened-button-content, .uc-embed-collapsed-button-content {
color: var(--theme-color-std-text);
}
6 changes: 6 additions & 0 deletions packages/documentation/src/theme/SiteMetadata/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ export default function SiteMetadata() {
<meta key={i} {...metadatum} />
))}
</Head>

<Head>
<script src="//w3.siemens.com/ote/ote_config.js" no-cors></script>
<script src="//w3.siemens.com/ote/global/ote.js"></script>
<script src="https://assets.adobedtm.com/5dfc7d97c6fb/7699a47b720a/launch-2157063140e5.min.js" async></script>
</Head>
</>
);
}

0 comments on commit 4f50607

Please sign in to comment.