-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added heatmaps remote opt in (#21807)
- Loading branch information
1 parent
c7d506b
commit 494e83d
Showing
37 changed files
with
285 additions
and
10 deletions.
There are no files selected for viewing
Binary file modified
BIN
+776 Bytes
(100%)
frontend/__snapshots__/scenes-other-settings--settings-project--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+704 Bytes
(100%)
frontend/__snapshots__/scenes-other-settings--settings-project--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { LemonSwitch } from '@posthog/lemon-ui' | ||
import { useActions, useValues } from 'kea' | ||
import { eventUsageLogic } from 'lib/utils/eventUsageLogic' | ||
import { teamLogic } from 'scenes/teamLogic' | ||
import { userLogic } from 'scenes/userLogic' | ||
|
||
export function HeatmapsSettings(): JSX.Element { | ||
const { userLoading } = useValues(userLogic) | ||
const { currentTeam } = useValues(teamLogic) | ||
const { updateCurrentTeam } = useActions(teamLogic) | ||
const { reportHeatmapsToggled } = useActions(eventUsageLogic) | ||
|
||
return ( | ||
<> | ||
<p> | ||
If you use our JavaScript libraries, we can capture general clicks, mouse movements, and scrolling to | ||
create heatmaps. No additional events are created, and you can disable this at any time. | ||
<br /> | ||
Whereas Autocapture creates events whenever it can uniquely identify an interacted element, heatmaps are | ||
generated based on overall mouse or touch positions and are useful for understanding more general user | ||
behavior across your site. | ||
</p> | ||
<div className="space-y-2"> | ||
<LemonSwitch | ||
id="posthog-heatmaps-switch" | ||
onChange={(checked) => { | ||
updateCurrentTeam({ | ||
heatmaps_opt_in: checked, | ||
}) | ||
reportHeatmapsToggled(checked) | ||
}} | ||
checked={!!currentTeam?.heatmaps_opt_in} | ||
disabled={userLoading} | ||
label="Enable heatmaps for web" | ||
bordered | ||
/> | ||
</div> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.