Skip to content

Commit

Permalink
add event goals for download buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Aug 27, 2024
1 parent 7e82f84 commit 8e651fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions documentation/.vuepress/components/needle-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ export default {
secondary: Boolean,
same_tab: Boolean,
large: Boolean,
}
event_goal: String,
event_position: String,
},
}
</script>

<style scoped>
Expand Down Expand Up @@ -39,7 +42,7 @@ a {
</style>

<template>
<a :href="href" :target="same_tab ? '_self' : '_blank'">
<a :href="href" :target="same_tab ? '_self' : '_blank'" :class="event_goal ? ('plausible-event-name=' + event_goal + (event_position ? (' plausible-event-position=' + event_position) : '')) : ''">
<button>
<slot></slot>
</button>
Expand Down
4 changes: 2 additions & 2 deletions documentation/blender/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you have feedback for us please let us know in [our forum](https://forum.need
### Step 2 • <os-link windows_url="https://nodejs.org/dist/v20.9.0/node-v20.9.0-x64.msi" osx_url="https://nodejs.org/dist/v20.9.0/node-v20.9.0.pkg">Install Nodejs ⭐</os-link>
</ClientOnly>

### Step 3 • <a target="_blank" href="https://engine.needle.tools/downloads/blender">Download Needle Engine for Blender</a>
### Step 3 • <a class="plausible-event-name=download_blender plausible-event-position=blender_download" target="_blank" href="https://engine.needle.tools/downloads/blender?utm_source=needle_docs&utm_content=blender">Download Needle Engine for Blender</a>

*The Blender addon is downloaded as a zip file.
In Blender go to `File / Settings / Add-ons` and click the `Install` button.
Expand All @@ -43,7 +43,7 @@ Then select the downloaded zip to install it.*

## Getting Started 🚩

- [Download Blender Samples](https://engine.needle.tools/downloads/blender/download-samples)
- [Download Blender Samples](https://engine.needle.tools/downloads/blender/download-samples?utm_source=needle_docs&utm_content=blender)

First create or open a new blend file that you want to be exported to the web.
Open the Properties window open the scene category. Select a `Project Path` in the Needle Engine panel. Then click `Generate Project`. It will automatically install and start the server - once it has finished your browser should open and the threejs scene will load.
Expand Down
4 changes: 2 additions & 2 deletions documentation/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Next continue at

*We support Unity 2021 LTS and 2022 LTS*

<needle-button large href="https://engine.needle.tools/downloads/unity"><strong>Download Needle Engine for Unity</strong></needle-button>
<needle-button event_goal="download_unity" event_position="getting_started" large href="https://engine.needle.tools/downloads/unity?utm_source=needle_docs&utm_content=getting_started"><strong>Download Needle Engine for Unity</strong></needle-button>
<!-- [Mirror](https://package-installer.glitch.me/v1/installer/needle/com.needle.engine-exporter?registry=https://packages.needle.tools&scope=com.needle&scope=org.khronos) -->

- Drop the downloaded .unitypackage file into a Unity project (or double click to open) and confirm that you want to import it.
Expand Down Expand Up @@ -141,7 +141,7 @@ By default, the project name matches the name of your scene. If you want to chan
## Needle Engine with Blender
*We support Blender 4.0 and Blender 4.1+*

<needle-button large href="https://engine.needle.tools/downloads/blender"><strong>Download Needle Engine for Blender</strong></needle-button>
<needle-button event_goal="download_blender" event_position="getting_started" large href="https://engine.needle.tools/downloads/blender?utm_source=needle_docs&utm_content=getting_started"><strong>Download Needle Engine for Blender</strong></needle-button>


*With Needle Engine for Blender you can build fully interactive 3D websites running on three.js.
Expand Down

0 comments on commit 8e651fc

Please sign in to comment.