open-index/open-npm huggingface dataset:
npm package: @freshheads/analytics-essentials
Description: Essentials for setting up analytics with Mixpanel, Google Analytics and Google Tag Manager
Author: Freshheads
Latest version: 1.1.1

# FH Analytics Essentials

## Getting started

### Install via NPM

```bash
npm i @freshheads/analytics-essentials
```

### Usage by analytics provider

- [Mixpanel](doc/mixpanel_setup.md)
- [Gtag](doc/gtag_setup.md)
- [Tagmanager](doc/tagmanager_setup.md)
npm package: @freshheads/cookie-guard
Description: Let user manage cookie usage
Author: Freshheads
Latest version: 4.0.1

# FHCookieGuard

A set of hooks to use to save a user's cookie preferences in a cookie(🥲).

The cookie settings are stored as follows:

`'["functional","analytics","marketing"]'`

## Setup with @freshheads/analytics-essentials

-   [Gtag & analytics-essentials setup](doc/gtag_setup.md)
-   [Tag Manager & analytics-essentials setup](doc/tagmanager_setup.md)

## Usage

You can use the build in cookieguard to get up and running quickly or use the provided hooks to make your own.

The cookiebanner makes use of Context to share the cookie state throughout the app.

-   Wrap your app with the Provider:

```jsx
import { CookieGuardContextProvider } from '@freshheads/cookie-guard';

<CookieGuardContextProvider>
    <App />
</CookieGuardContextProvider>;
```

-   The provider optionally accepts:

    -   onCookiesChange
    -   onCookiesSet
    -   onCookiesCleared

    e.g. If you want to change the Google consent options based on the cookie settings

-   Add the premade Cookie Banner to your app

```jsx
import {
    CookieBanner,
    CookieCategorySettings,
    CookieGuardProvider
} from '@freshheads/cookie-guard';
import '@freshheads/cookie-guard/dist/style.css';

const CookieGuardProps = {
    title: 'Onze site maakt gebruik van cookies.',
    description:
        'Wij gebruiken cookies voor de werking van de website, analyse en verbetering en marketingdoeleinden.',
    acceptAllLabel: 'Alle cookies accepteren',
    saveLabel: 'Opslaan',
    requiredLabel: 'Noodzakelijke cookies'.
    functionalLabel: 'Functionele cookies',
    analyticsLabel: 'Analytische cookies',
    marketingLabel: 'Marketing cookies',
}

return (
    <CookieGuardProvider>
        {/** your app components **/}
        <CookieBanner {...CookieGuardProps} />
    </CookieGuardProvider>
);
```

-   To style look at the source code `/src/popupstyles.css` and import your own css.

-   You can also use the hooks to make your own custom cookiebanner

## Examples

-   [Chakra-UI](examples/ChakraUI) custom cookie banner
npm package: @freshheads/react-native-http-client
Description: A Native HTTP Client for React Native projects.
Author: Kevin van der Burg
Latest version: 0.1.3

# React-Native-Http-Client

A Native HTTP Client for React Native projects.

For iOS, it utilizes URLRequest and URLSession. For Android, it deploys OkHttp.

The rationale behind this package is to provide a straightforward HTTP client that functions seamlessly across both
platforms and is user-friendly. Our objective was to establish a connection with a webservice hosted on an embedded
device. However, we encountered a persistent 401 error. Interestingly, the connection was successful via Postman.

We experimented with Axios, Fetch, and XMLHttpRequest to no avail. Consequently, we decided to devise a native HTTP
client that would cater to both platforms and simultaneously ensure simplicity of use.

Currently, the package only supports GET requests. However, we intend to incorporate additional methods as per
requirements in the future.

## Installation

Install the package using npm:

```sh
npm install react-native-http-client --save
```

## Example

To run the example:

```sh
yarn

# Android app
yarn example android

# iOS app
yarn example ios
```

## Usage

Basic usage:

```js
import { client } from 'react-native-http-client';

const output = await client.get(
  'https://example.dev/'
);

console.log(output.body);
```

Usage with headers and parameters:

```js
import { client } from 'react-native-http-client';

const output = await client.get(
  'https://example.dev/',
  {
    headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
    },
    params: {
      'param1': 'value1',
      'param2': 'value2',
    },
  }
);

console.log(output.body);
```

## Contributing

To learn how to contribute to the repository and the development workflow, please refer to
the [contributing guide](CONTRIBUTING.md).

## License

MIT License.

---

Crafted with care using [create-react-native-library](https://github.com/callstack/react-native-builder-bob).